增加必填校验 提升casbin版本 (#1170)

* 添加rule检测

* 调整初始化顺序,防止在数据库创建错误的时候,修改了配置文件。

* (feat):自动生产代码新增校验

* 增加校验功能 升级casbin

Co-authored-by: bypanghu <bypanghu@163.com>
This commit is contained in:
奇淼(piexlmax
2022-07-14 16:20:34 +08:00
committed by GitHub
parent 14de145c02
commit f0d31fd48d
17 changed files with 604 additions and 347 deletions

View File

@@ -22,6 +22,7 @@ type AutoCodeStruct struct {
DictTypes []string `json:"-"`
Package string `json:"package"`
PackageT string `json:"-"`
NeedValid bool `json:"-"`
}
func (a *AutoCodeStruct) Pretreatment() {
@@ -55,6 +56,9 @@ type Field struct {
ColumnName string `json:"columnName"` // 数据库字段
FieldSearchType string `json:"fieldSearchType"` // 搜索条件
DictType string `json:"dictType"` // 字典
Require bool `json:"require"` // 是否必填
ErrorText string `json:"errorText"` // 校验失败文字
Clearable bool `json:"clearable"` // 是否可清空
}
var AutoMoveErr error = errors.New("创建代码成功并移动文件成功")