[feat] 移除 ResFieldByMap, ResFieldByAnys 类型

This commit is contained in:
2023-06-23 00:10:24 +08:00
parent 88ed380018
commit 6ccef0fbb8
25 changed files with 416 additions and 459 deletions
+20 -16
View File
@@ -1,23 +1,27 @@
package base
import (
"git.fsdpf.net/go/contracts/res_type"
)
type ResApiParam struct {
Code string `db:"code"`
Name string `db:"name"`
Category string `db:"category"`
DataType string `db:"type"`
isRequired bool `db:"isRequired"`
}
type ResApi struct {
Uuid string `db:"uuid"`
Code string `db:"code"`
UriPrefix string `db:"uri_prefix"`
Name string `db:"name"`
PrimaryKey string `db:"primaryKey"`
ResourceUuid string `db:"resource_uuid"`
Method string `db:"method"`
Category string `db:"action"`
Params res_type.ResFieldByAnys `db:"params"`
Roles res_type.ResFieldByAnys `db:"roles"`
IsAuthDB int `db:"is_auth_db"` // 启用权限过滤
UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"`
Uuid string `db:"uuid"`
Code string `db:"code"`
UriPrefix string `db:"uri_prefix"`
Name string `db:"name"`
PrimaryKey string `db:"primaryKey"`
ResourceUuid string `db:"resource_uuid"`
Method string `db:"method"`
Category string `db:"action"`
Params []ResApiParam `db:"params"`
Roles []string `db:"roles"`
IsAuthDB int `db:"is_auth_db"` // 启用权限过滤
UpdatedAt string `db:"updated_at"`
CreatedAt string `db:"created_at"`
}
type GetResApi func(code string) (ResApi, bool)