2023-08-28 06:57:01 +00:00
|
|
|
package gmodel
|
|
|
|
|
|
|
|
import (
|
|
|
|
"gorm.io/gorm"
|
|
|
|
)
|
|
|
|
|
2023-11-10 07:24:25 +00:00
|
|
|
// casbin_rule
|
2023-08-28 06:57:01 +00:00
|
|
|
type CasbinRule struct {
|
2023-11-10 07:24:25 +00:00
|
|
|
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"}
|
|
|
|
}
|