广告平台(总站长使用)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

role_dao.go 671 B

4 months ago
12345678910111213141516171819202122232425
  1. package dao
  2. import (
  3. "applet/app/db/model"
  4. "xorm.io/xorm"
  5. )
  6. type RoleDao interface {
  7. FindRole() (*[]model.Role, error)
  8. GetRole() (m *model.Role, err error)
  9. UpdateRole(m *model.Role, columns ...string) (int64, error)
  10. RoleDeleteBySession(session *xorm.Session, id interface{}) (int64, error)
  11. RoleInsert(m *model.Role) (int, error)
  12. FindPermissionGroupByRole(roleId int) (list []*RolePermissionGroup, total int64, err error)
  13. }
  14. type RolePermissionGroup struct {
  15. model.Role `xorm:"extends"`
  16. model.RolePermissionGroup `xorm:"extends"`
  17. model.PermissionGroup `xorm:"extends"`
  18. }
  19. func (RolePermissionGroup) TableName() string {
  20. return "role"
  21. }