credit_balance.gen.go 1.7 KB

12345678910111213141516171819202122232425262728293031
  1. // Code generated by gorm.io/gen. DO NOT EDIT.
  2. // Code generated by gorm.io/gen. DO NOT EDIT.
  3. // Code generated by gorm.io/gen. DO NOT EDIT.
  4. package model
  5. import (
  6. "time"
  7. "github.com/shopspring/decimal"
  8. "gorm.io/gorm"
  9. )
  10. const TableNameCreditBalance = "credit_balance"
  11. // CreditBalance 积分余额表
  12. type CreditBalance struct {
  13. ID int64 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
  14. CreatedAt time.Time `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP;comment:Create Time | 创建日期" json:"created_at"` // Create Time | 创建日期
  15. UpdatedAt time.Time `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP;comment:Update Time | 修改日期" json:"updated_at"` // Update Time | 修改日期
  16. Status int64 `gorm:"column:status;not null;default:1;comment:状态 1 正常 2 禁用" json:"status"` // 状态 1 正常 2 禁用
  17. DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:Delete Time | 删除日期" json:"deleted_at"` // Delete Time | 删除日期
  18. UserID string `gorm:"column:user_id;not null;default:1;comment:用户ID" json:"user_id"` // 用户ID
  19. Balance decimal.Decimal `gorm:"column:balance;not null;default:0.0000;comment:积分余额" json:"balance"` // 积分余额
  20. OrganizationID int64 `gorm:"column:organization_id;not null;comment:机构 ID" json:"organization_id"` // 机构 ID
  21. }
  22. // TableName CreditBalance's table name
  23. func (*CreditBalance) TableName() string {
  24. return TableNameCreditBalance
  25. }