package models import ( // "gorm.io/gorm" "go-admin/common/models" ) type OrgNews struct { models.Model NewsName string `json:"newsName" gorm:"type:varchar(20);comment:NewsName"` NewsTitle string `json:"newsTitle" gorm:"type:varchar(20);comment:NewsTitle"` NewsContent string `json:"newsContent" gorm:"type:text;comment:NewsContent"` Status string `json:"status" gorm:"type:tinyint(1);comment:Status"` models.ModelTime models.ControlBy } func (OrgNews) TableName() string { return "org_news" } func (e *OrgNews) Generate() models.ActiveRecord { o := *e return &o } func (e *OrgNews) GetId() interface{} { return e.Id }