package models import ( "time" ) // 用户与角色关联表 type MgtLinkUserRole struct { RoleId uint `gorm:"column:role_id;primaryKey" json:"role_id"` // 角色ID UserId uint `gorm:"column:user_id;primaryKey" json:"user_id"` // 用户ID CreatedAt time.Time `gorm:"column:created_at;autoCreateTime" json:"created_at,omitempty"` // 创建时间 } func (MgtLinkUserRole) TableName() string { return "mgt_link_user_role" } // func init() { // database.AppendMigrate(&MgtLinkUserRole{}) // }