2023-04-12 16:56:55 +08:00
|
|
|
package base
|
|
|
|
|
2023-06-23 00:10:24 +08:00
|
|
|
type ResApiParam struct {
|
|
|
|
Code string `db:"code"`
|
|
|
|
Name string `db:"name"`
|
|
|
|
Category string `db:"category"`
|
|
|
|
DataType string `db:"type"`
|
2023-06-23 11:43:35 +08:00
|
|
|
IsRequired bool `db:"isRequired"`
|
2023-06-23 00:10:24 +08:00
|
|
|
}
|
2023-04-12 16:56:55 +08:00
|
|
|
|
|
|
|
type ResApi struct {
|
2023-06-23 00:10:24 +08:00
|
|
|
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"`
|
2023-04-12 16:56:55 +08:00
|
|
|
}
|
2023-04-12 19:50:25 +08:00
|
|
|
|
|
|
|
type GetResApi func(code string) (ResApi, bool)
|