credit_usage.gen.go 2.6 KB

123456789101112131415161718192021222324252627282930313233343536
  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 TableNameCreditUsage = "credit_usage"
  11. // CreditUsage 积分变化明细表
  12. type CreditUsage 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;comment:用户ID" json:"user_id"` // 用户ID
  19. Number decimal.Decimal `gorm:"column:number;not null;default:0.0000;comment:积分改变量" json:"number"` // 积分改变量
  20. Ntype int64 `gorm:"column:ntype;not null;default:1;comment:积分变化类型:1-消耗 2-增加" json:"ntype"` // 积分变化类型:1-消耗 2-增加
  21. MTable string `gorm:"column:table;not null;comment:积分变化表名" json:"table"` // 积分变化表名
  22. Nid int64 `gorm:"column:nid;not null;comment:积分变化关联信息ID" json:"nid"` // 积分变化关联信息ID
  23. Reason string `gorm:"column:reason;comment:积分变动原因" json:"reason"` // 积分变动原因
  24. Operator string `gorm:"column:operator;comment:积分调整人" json:"operator"` // 积分调整人
  25. OrganizationID int64 `gorm:"column:organization_id;not null;default:1;comment:机构 ID" json:"organization_id"` // 机构 ID
  26. }
  27. // TableName CreditUsage's table name
  28. func (*CreditUsage) TableName() string {
  29. return TableNameCreditUsage
  30. }