Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModel ¶
type BaseModel struct { ID uint `json:"id" gorm:"primary_key"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt *time.Time `sql:"index" json:"-"` }
BaseModel BaseModel
type Bill ¶
type Bill struct { BaseModel Name string `json:"name" gorm:"not null"` //账单名称 Amount decimal.Decimal `json:"amount" gorm:"notnull;type:decimal(10,2)"` //账单金额 BillTypeID uint `json:"bill_type_id" gorm:"not null"` //账单类型ID,外键 BillType *BillType `json:"bill_type" gorm:"foreignKey:BillTypeID"` //账单类型 Date time.Time `json:"date" gorm:"not null"` //账单日期 Remark string `json:"remark"` //账单备注 UserID uint `json:"user_id" gorm:"not null"` //用户ID Owner User `json:"-" gorm:"foreignKey:UserID"` //用户 Income bool `json:"income" gorm:"not null"` //是否是收入项目 }
Bill 账单Model
Click to show internal directories.
Click to hide internal directories.