112 lines
2.0 KiB
Go
112 lines
2.0 KiB
Go
// Code generated by sqlc. DO NOT EDIT.
|
|
|
|
package postgres
|
|
|
|
import (
|
|
"database/sql"
|
|
"fmt"
|
|
"time"
|
|
|
|
"git.javil.eu/jacob1123/budgeteer/postgres/numeric"
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type TransactionStatus string
|
|
|
|
const (
|
|
TransactionStatusReconciled TransactionStatus = "Reconciled"
|
|
TransactionStatusCleared TransactionStatus = "Cleared"
|
|
TransactionStatusUncleared TransactionStatus = "Uncleared"
|
|
)
|
|
|
|
func (e *TransactionStatus) Scan(src interface{}) error {
|
|
switch s := src.(type) {
|
|
case []byte:
|
|
*e = TransactionStatus(s)
|
|
case string:
|
|
*e = TransactionStatus(s)
|
|
default:
|
|
return fmt.Errorf("unsupported scan type for TransactionStatus: %T", src)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Account struct {
|
|
ID uuid.UUID
|
|
BudgetID uuid.UUID
|
|
Name string
|
|
OnBudget bool
|
|
}
|
|
|
|
type Assignment struct {
|
|
ID uuid.UUID
|
|
CategoryID uuid.UUID
|
|
Date time.Time
|
|
Memo sql.NullString
|
|
Amount numeric.Numeric
|
|
}
|
|
|
|
type AssignmentsByMonth struct {
|
|
Date time.Time
|
|
CategoryID uuid.UUID
|
|
BudgetID uuid.UUID
|
|
Amount int64
|
|
}
|
|
|
|
type Budget struct {
|
|
ID uuid.UUID
|
|
Name string
|
|
LastModification sql.NullTime
|
|
IncomeCategoryID uuid.UUID
|
|
}
|
|
|
|
type Category struct {
|
|
ID uuid.UUID
|
|
CategoryGroupID uuid.UUID
|
|
Name string
|
|
}
|
|
|
|
type CategoryGroup struct {
|
|
ID uuid.UUID
|
|
BudgetID uuid.UUID
|
|
Name string
|
|
}
|
|
|
|
type Payee struct {
|
|
ID uuid.UUID
|
|
BudgetID uuid.UUID
|
|
Name string
|
|
}
|
|
|
|
type Transaction struct {
|
|
ID uuid.UUID
|
|
Date time.Time
|
|
Memo string
|
|
Amount numeric.Numeric
|
|
AccountID uuid.UUID
|
|
CategoryID uuid.NullUUID
|
|
PayeeID uuid.NullUUID
|
|
GroupID uuid.NullUUID
|
|
Status TransactionStatus
|
|
}
|
|
|
|
type TransactionsByMonth struct {
|
|
Date time.Time
|
|
CategoryID uuid.NullUUID
|
|
BudgetID uuid.UUID
|
|
Amount int64
|
|
}
|
|
|
|
type User struct {
|
|
ID uuid.UUID
|
|
Email string
|
|
Name string
|
|
Password string
|
|
LastLogin sql.NullTime
|
|
}
|
|
|
|
type UserBudget struct {
|
|
UserID uuid.UUID
|
|
BudgetID uuid.UUID
|
|
}
|