jiangshuai
2023-12-19 f6bf0ee81b080a2bad55aa5bf261c68ab3d555f8
global/model.go
@@ -7,10 +7,10 @@
)
type GVA_MODEL struct {
   ID        uint           `json:"id,string" gorm:"primarykey"` // 主键ID
   CreatedAt *time.Time     `json:"-"`                           // 创建时间
   UpdatedAt *time.Time     `json:"-"`                           // 更新时间
   DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`              // 删除时间
   ID        uint           `json:"id" gorm:"primarykey"` // 主键ID
   CreatedAt *time.Time     `json:"-"`                    // 创建时间
   UpdatedAt *time.Time     `json:"-"`                    // 更新时间
   DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`       // 删除时间
   FormattedCreatedAt string `gorm:"-" json:"created_at"`
   FormattedUpdatedAt string `gorm:"-" json:"updated_at"`
@@ -21,3 +21,13 @@
   m.FormattedUpdatedAt = m.UpdatedAt.Format("2006-01-02 15:04:05")
   return
}
type GVA_MODEL_INT struct {
   ID        uint           `json:"id,string" gorm:"primarykey"` // 主键ID
   CreatedAt *time.Time     `json:"-"`                           // 创建时间
   UpdatedAt *time.Time     `json:"-"`                           // 更新时间
   DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`              // 删除时间
   FormattedCreatedAt string `gorm:"-" json:"created_at"`
   FormattedUpdatedAt string `gorm:"-" json:"updated_at"`
}