package dao import ( "applet/app/db/model" "xorm.io/xorm" ) type MediumRoleDao interface { FindMediumRole() (*[]model.MediumRole, error) GetMediumRole() (m *model.MediumRole, err error) UpdateMediumRole(m *model.MediumRole, columns ...string) (int64, error) MediumRoleDeleteBySession(session *xorm.Session, id interface{}) (int64, error) MediumRoleInsert(m *model.MediumRole) (int, error) FindPermissionGroupByMediumRole(roleId int) (list []*MediumRolePermissionGroup, total int64, err error) } type MediumRolePermissionGroup struct { model.MediumRole `xorm:"extends"` model.MediumRolePermissionGroup `xorm:"extends"` model.MediumPermissionGroup `xorm:"extends"` } func (MediumRolePermissionGroup) TableName() string { return "medium_role" }