添加访问日志表及相关字段,更新模型字段注释
This commit is contained in:
@@ -34,6 +34,7 @@ func newClient(db *gorm.DB, opts ...gen.DOOption) client {
|
||||
_client.GrantCode = field.NewBool(tableName, "grant_code")
|
||||
_client.GrantClient = field.NewBool(tableName, "grant_client")
|
||||
_client.GrantRefresh = field.NewBool(tableName, "grant_refresh")
|
||||
_client.GrantPassword = field.NewBool(tableName, "grant_password")
|
||||
_client.Spec = field.NewInt32(tableName, "spec")
|
||||
_client.Name = field.NewString(tableName, "name")
|
||||
_client.Icon = field.NewString(tableName, "icon")
|
||||
@@ -41,7 +42,6 @@ func newClient(db *gorm.DB, opts ...gen.DOOption) client {
|
||||
_client.CreatedAt = field.NewField(tableName, "created_at")
|
||||
_client.UpdatedAt = field.NewField(tableName, "updated_at")
|
||||
_client.DeletedAt = field.NewField(tableName, "deleted_at")
|
||||
_client.GrantPassword = field.NewBool(tableName, "grant_password")
|
||||
|
||||
_client.fillFieldMap()
|
||||
|
||||
@@ -59,14 +59,14 @@ type client struct {
|
||||
GrantCode field.Bool // 允许授权码授予
|
||||
GrantClient field.Bool // 允许客户端凭证授予
|
||||
GrantRefresh field.Bool // 允许刷新令牌授予
|
||||
Spec field.Int32 // 安全规范:0-web,1-native,2-browser
|
||||
GrantPassword field.Bool // 允许密码授予
|
||||
Spec field.Int32 // 安全规范:1-native,2-browser,3-web
|
||||
Name field.String // 名称
|
||||
Icon field.String // 图标URL
|
||||
Status field.Int32 // 状态:1-正常,0-禁用
|
||||
Status field.Int32 // 状态:0-禁用,1-正常
|
||||
CreatedAt field.Field // 创建时间
|
||||
UpdatedAt field.Field // 更新时间
|
||||
DeletedAt field.Field // 删除时间
|
||||
GrantPassword field.Bool
|
||||
|
||||
fieldMap map[string]field.Expr
|
||||
}
|
||||
@@ -90,6 +90,7 @@ func (c *client) updateTableName(table string) *client {
|
||||
c.GrantCode = field.NewBool(table, "grant_code")
|
||||
c.GrantClient = field.NewBool(table, "grant_client")
|
||||
c.GrantRefresh = field.NewBool(table, "grant_refresh")
|
||||
c.GrantPassword = field.NewBool(table, "grant_password")
|
||||
c.Spec = field.NewInt32(table, "spec")
|
||||
c.Name = field.NewString(table, "name")
|
||||
c.Icon = field.NewString(table, "icon")
|
||||
@@ -97,7 +98,6 @@ func (c *client) updateTableName(table string) *client {
|
||||
c.CreatedAt = field.NewField(table, "created_at")
|
||||
c.UpdatedAt = field.NewField(table, "updated_at")
|
||||
c.DeletedAt = field.NewField(table, "deleted_at")
|
||||
c.GrantPassword = field.NewBool(table, "grant_password")
|
||||
|
||||
c.fillFieldMap()
|
||||
|
||||
@@ -122,6 +122,7 @@ func (c *client) fillFieldMap() {
|
||||
c.fieldMap["grant_code"] = c.GrantCode
|
||||
c.fieldMap["grant_client"] = c.GrantClient
|
||||
c.fieldMap["grant_refresh"] = c.GrantRefresh
|
||||
c.fieldMap["grant_password"] = c.GrantPassword
|
||||
c.fieldMap["spec"] = c.Spec
|
||||
c.fieldMap["name"] = c.Name
|
||||
c.fieldMap["icon"] = c.Icon
|
||||
@@ -129,7 +130,6 @@ func (c *client) fillFieldMap() {
|
||||
c.fieldMap["created_at"] = c.CreatedAt
|
||||
c.fieldMap["updated_at"] = c.UpdatedAt
|
||||
c.fieldMap["deleted_at"] = c.DeletedAt
|
||||
c.fieldMap["grant_password"] = c.GrantPassword
|
||||
}
|
||||
|
||||
func (c client) clone(db *gorm.DB) client {
|
||||
|
||||
Reference in New Issue
Block a user