Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bill ¶
type Bill struct { ID uuid.UUID `json:"id" gorm:"type:uuid;default:gen_random_uuid()"` DueDateOfMonth int `json:"due_date_of_month"` Name string `json:"name"` Notes string `json:"notes"` IsAutoPayment bool `json:"auto_payment"` AutoPaymentDateOfMonth int `json:"auto_payment_date_of_month"` Amount decimal.Decimal `json:"amount" gorm:"type:numeric(6,2);"` PaydayId uuid.UUID `json:"payday_id"` }
type Worksheet ¶
type Worksheet struct { ID uuid.UUID `json:"id" gorm:"type:uuid;default:gen_random_uuid()"` UserID string `json:"user_id"` Month int `json:"month"` Day int `json:"day"` Year int `json:"year"` InBank decimal.Decimal `json:"in_bank" gorm:"type:numeric(6,2);"` Total decimal.Decimal `json:"total" gorm:"type:numeric(6,2);"` Net decimal.Decimal `json:"net" gorm:"->;type:numeric(6,2) GENERATED ALWAYS AS (in_bank - total) STORED;"` TotalPaid decimal.Decimal `json:"total_paid" gorm:"type:numeric(6,2);"` NetAfterPaid decimal.Decimal `json:"net_after_paid" gorm:"->;type:numeric(6,2) GENERATED ALWAYS AS (in_bank - total_paid) STORED;"` Items []WorksheetItem `json:"items" gorm:"constraint:OnDelete:CASCADE;"` }
type WorksheetItem ¶
type WorksheetItem struct { ID uuid.UUID `json:"id" gorm:"type:uuid;default:gen_random_uuid()"` Name string `json:"name"` Amount decimal.Decimal `json:"amount" gorm:"type:numeric(6,2);"` IsPaid bool `json:"is_paid"` DueDateOfMonth int `json:"due_date_of_month"` Notes string `json:"notes"` WorksheetId uuid.UUID `json:"worksheet_id"` }
Click to show internal directories.
Click to hide internal directories.