package model import ( "time" "gorm.io/gorm" ) type MiniProgram struct { ID uint `gorm:"primarykey" json:"id"` CreatedAt time.Time `gorm:"comment:创建时间" json:"created_at"` UpdatedAt time.Time `gorm:"comment:更新时间" json:"updated_at"` DeletedAt gorm.DeletedAt `gorm:"index;comment:删除时间" json:"-"` Name string `gorm:"size:100;not null;comment:小程序名称" json:"name"` AppID string `gorm:"size:100;uniqueIndex;comment:小程序AppID" json:"app_id"` AppSecret string `gorm:"size:200;not null;comment:小程序AppSecret" json:"-"` Description string `gorm:"size:255;comment:描述" json:"description"` } func (MiniProgram) TableName() string { return "mini_programs" } func (MiniProgram) TableComment() string { return "小程序配置" }