package en_company_permission import ( "hongze/hongze_yb_en_api/global" "time" ) type EnCompanyPermission struct { EnCompanyPermissionNameId int `gorm:"primaryKey;column:en_company_permission_id" json:"en_company_permission_id"` EnCompanyId int `gorm:"column:en_company_id" json:"en_company_id"` EnPermissionId int `gorm:"column:en_permission_id" json:"en_permission_id"` CreateTime time.Time `gorm:"autoCreateTime;column:create_time" json:"create_time"` //创建时间 } func (c *EnCompanyPermission) TableName() string { return "en_company_permission" } func (c *EnCompanyPermission) GetList(condition string, pars []interface{}) (list []*EnCompanyPermission, err error) { err = global.DEFAULT_MYSQL.Model(c).Where(condition, pars).Order("create_time DESC").Scan(&list).Error return }