role_access.go 409 B

123456789101112131415
  1. package models
  2. type RoleAccess struct {
  3. ID string `json:"id" gorm:"column:id" bson:"_id"`
  4. RoleId string `json:"role_id" gorm:"column:role_id" bson:"role_id"` // 角色ID
  5. AccessID []string `json:"access_id" gorm:"column:access_id" bson:"access_id"` // 权限ID MAP
  6. }
  7. func (t *RoleAccess) TableName() string {
  8. return "role_access"
  9. }
  10. func (t *RoleAccess) GetID() string {
  11. return t.ID
  12. }