重构代码结构与认证体系,集成异步任务消费者
This commit is contained in:
@@ -31,12 +31,12 @@ func newProxy(db *gorm.DB, opts ...gen.DOOption) proxy {
|
||||
_proxy.Version = field.NewInt32(tableName, "version")
|
||||
_proxy.Name = field.NewString(tableName, "name")
|
||||
_proxy.Host = field.NewString(tableName, "host")
|
||||
_proxy.Type = field.NewInt32(tableName, "type")
|
||||
_proxy.Secret = field.NewString(tableName, "secret")
|
||||
_proxy.Type = field.NewInt32(tableName, "type")
|
||||
_proxy.Status = field.NewInt32(tableName, "status")
|
||||
_proxy.CreatedAt = field.NewField(tableName, "created_at")
|
||||
_proxy.UpdatedAt = field.NewField(tableName, "updated_at")
|
||||
_proxy.DeletedAt = field.NewField(tableName, "deleted_at")
|
||||
_proxy.Status = field.NewInt32(tableName, "status")
|
||||
_proxy.Edges = proxyHasManyEdges{
|
||||
db: db.Session(&gorm.Session{}),
|
||||
|
||||
@@ -56,12 +56,12 @@ type proxy struct {
|
||||
Version field.Int32 // 代理服务版本
|
||||
Name field.String // 代理服务名称
|
||||
Host field.String // 代理服务地址
|
||||
Type field.Int32 // 代理服务类型:1-三方,2-自有
|
||||
Secret field.String // 代理服务密钥
|
||||
Type field.Int32 // 代理服务类型:1-三方,2-自有
|
||||
Status field.Int32 // 代理服务状态:0-离线,1-在线
|
||||
CreatedAt field.Field // 创建时间
|
||||
UpdatedAt field.Field // 更新时间
|
||||
DeletedAt field.Field // 删除时间
|
||||
Status field.Int32 // 代理服务状态:0-离线,1-在线
|
||||
Edges proxyHasManyEdges
|
||||
|
||||
fieldMap map[string]field.Expr
|
||||
@@ -83,12 +83,12 @@ func (p *proxy) updateTableName(table string) *proxy {
|
||||
p.Version = field.NewInt32(table, "version")
|
||||
p.Name = field.NewString(table, "name")
|
||||
p.Host = field.NewString(table, "host")
|
||||
p.Type = field.NewInt32(table, "type")
|
||||
p.Secret = field.NewString(table, "secret")
|
||||
p.Type = field.NewInt32(table, "type")
|
||||
p.Status = field.NewInt32(table, "status")
|
||||
p.CreatedAt = field.NewField(table, "created_at")
|
||||
p.UpdatedAt = field.NewField(table, "updated_at")
|
||||
p.DeletedAt = field.NewField(table, "deleted_at")
|
||||
p.Status = field.NewInt32(table, "status")
|
||||
|
||||
p.fillFieldMap()
|
||||
|
||||
@@ -110,12 +110,12 @@ func (p *proxy) fillFieldMap() {
|
||||
p.fieldMap["version"] = p.Version
|
||||
p.fieldMap["name"] = p.Name
|
||||
p.fieldMap["host"] = p.Host
|
||||
p.fieldMap["type"] = p.Type
|
||||
p.fieldMap["secret"] = p.Secret
|
||||
p.fieldMap["type"] = p.Type
|
||||
p.fieldMap["status"] = p.Status
|
||||
p.fieldMap["created_at"] = p.CreatedAt
|
||||
p.fieldMap["updated_at"] = p.UpdatedAt
|
||||
p.fieldMap["deleted_at"] = p.DeletedAt
|
||||
p.fieldMap["status"] = p.Status
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user