2023-08-28 06:57:01 +00:00
|
|
|
package gmodel
|
|
|
|
|
|
|
|
import (
|
|
|
|
"gorm.io/gorm"
|
|
|
|
)
|
|
|
|
|
2023-10-11 04:23:41 +00:00
|
|
|
// casbin_rule 后台--权限规则表
|
2023-08-28 06:57:01 +00:00
|
|
|
type CasbinRule struct {
|
2023-10-11 04:23:41 +00:00
|
|
|
Id int64 `gorm:"primary_key;default:0;auto_increment;" json:"id"` // 序号
|
|
|
|
PType *string `gorm:"default:'';" json:"p_type"` //
|
|
|
|
V0 *string `gorm:"default:'';" json:"v0"` //
|
|
|
|
V1 *string `gorm:"default:'';" json:"v1"` //
|
|
|
|
V2 *string `gorm:"default:'';" json:"v2"` //
|
|
|
|
V3 *string `gorm:"default:'';" json:"v3"` //
|
|
|
|
V4 *string `gorm:"default:'';" json:"v4"` //
|
|
|
|
V5 *string `gorm:"default:'';" json:"v5"` //
|
2023-08-28 06:57:01 +00:00
|
|
|
}
|
|
|
|
type CasbinRuleModel struct {
|
|
|
|
db *gorm.DB
|
|
|
|
name string
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewCasbinRuleModel(db *gorm.DB) *CasbinRuleModel {
|
|
|
|
return &CasbinRuleModel{db: db, name: "casbin_rule"}
|
|
|
|
}
|