support user role attachment
This commit is contained in:
@@ -32,9 +32,9 @@ func newSysDictionary(db *gorm.DB, opts ...gen.DOOption) sysDictionary {
|
||||
_sysDictionary.UpdatedAt = field.NewTime(tableName, "updated_at")
|
||||
_sysDictionary.DeletedAt = field.NewField(tableName, "deleted_at")
|
||||
_sysDictionary.Name = field.NewString(tableName, "name")
|
||||
_sysDictionary.Type = field.NewString(tableName, "type")
|
||||
_sysDictionary.Alias_ = field.NewString(tableName, "alias")
|
||||
_sysDictionary.Status = field.NewBool(tableName, "status")
|
||||
_sysDictionary.Desc = field.NewString(tableName, "desc")
|
||||
_sysDictionary.Description = field.NewString(tableName, "description")
|
||||
|
||||
_sysDictionary.fillFieldMap()
|
||||
|
||||
@@ -44,15 +44,15 @@ func newSysDictionary(db *gorm.DB, opts ...gen.DOOption) sysDictionary {
|
||||
type sysDictionary struct {
|
||||
sysDictionaryDo sysDictionaryDo
|
||||
|
||||
ALL field.Asterisk
|
||||
ID field.Uint64
|
||||
CreatedAt field.Time
|
||||
UpdatedAt field.Time
|
||||
DeletedAt field.Field
|
||||
Name field.String // 字典名(中)
|
||||
Type field.String // 字典名(英)
|
||||
Status field.Bool // 状态
|
||||
Desc field.String // 描述
|
||||
ALL field.Asterisk
|
||||
ID field.Uint64
|
||||
CreatedAt field.Time
|
||||
UpdatedAt field.Time
|
||||
DeletedAt field.Field
|
||||
Name field.String // 字典名(中)
|
||||
Alias_ field.String // 字典名(英)
|
||||
Status field.Bool // 状态
|
||||
Description field.String // 描述
|
||||
|
||||
fieldMap map[string]field.Expr
|
||||
}
|
||||
@@ -74,9 +74,9 @@ func (s *sysDictionary) updateTableName(table string) *sysDictionary {
|
||||
s.UpdatedAt = field.NewTime(table, "updated_at")
|
||||
s.DeletedAt = field.NewField(table, "deleted_at")
|
||||
s.Name = field.NewString(table, "name")
|
||||
s.Type = field.NewString(table, "type")
|
||||
s.Alias_ = field.NewString(table, "alias")
|
||||
s.Status = field.NewBool(table, "status")
|
||||
s.Desc = field.NewString(table, "desc")
|
||||
s.Description = field.NewString(table, "description")
|
||||
|
||||
s.fillFieldMap()
|
||||
|
||||
@@ -107,9 +107,9 @@ func (s *sysDictionary) fillFieldMap() {
|
||||
s.fieldMap["updated_at"] = s.UpdatedAt
|
||||
s.fieldMap["deleted_at"] = s.DeletedAt
|
||||
s.fieldMap["name"] = s.Name
|
||||
s.fieldMap["type"] = s.Type
|
||||
s.fieldMap["alias"] = s.Alias_
|
||||
s.fieldMap["status"] = s.Status
|
||||
s.fieldMap["desc"] = s.Desc
|
||||
s.fieldMap["description"] = s.Description
|
||||
}
|
||||
|
||||
func (s sysDictionary) clone(db *gorm.DB) sysDictionary {
|
||||
|
||||
@@ -31,11 +31,11 @@ func newSysDictionaryDetail(db *gorm.DB, opts ...gen.DOOption) sysDictionaryDeta
|
||||
_sysDictionaryDetail.CreatedAt = field.NewTime(tableName, "created_at")
|
||||
_sysDictionaryDetail.UpdatedAt = field.NewTime(tableName, "updated_at")
|
||||
_sysDictionaryDetail.DeletedAt = field.NewField(tableName, "deleted_at")
|
||||
_sysDictionaryDetail.Label = field.NewString(tableName, "label")
|
||||
_sysDictionaryDetail.Value = field.NewInt64(tableName, "value")
|
||||
_sysDictionaryDetail.Status = field.NewBool(tableName, "status")
|
||||
_sysDictionaryDetail.Sort = field.NewInt64(tableName, "sort")
|
||||
_sysDictionaryDetail.SysDictionaryID = field.NewInt64(tableName, "sys_dictionary_id")
|
||||
_sysDictionaryDetail.Label = field.NewString(tableName, "label")
|
||||
_sysDictionaryDetail.Value = field.NewString(tableName, "value")
|
||||
_sysDictionaryDetail.Status = field.NewBool(tableName, "status")
|
||||
_sysDictionaryDetail.Weight = field.NewInt64(tableName, "weight")
|
||||
|
||||
_sysDictionaryDetail.fillFieldMap()
|
||||
|
||||
@@ -50,11 +50,11 @@ type sysDictionaryDetail struct {
|
||||
CreatedAt field.Time
|
||||
UpdatedAt field.Time
|
||||
DeletedAt field.Field
|
||||
Label field.String // 展示值
|
||||
Value field.Int64 // 字典值
|
||||
Status field.Bool // 启用状态
|
||||
Sort field.Int64 // 排序标记
|
||||
SysDictionaryID field.Int64 // 关联标记
|
||||
Label field.String // 展示值
|
||||
Value field.String // 字典值
|
||||
Status field.Bool // 启用状态
|
||||
Weight field.Int64 // 排序权重
|
||||
|
||||
fieldMap map[string]field.Expr
|
||||
}
|
||||
@@ -75,11 +75,11 @@ func (s *sysDictionaryDetail) updateTableName(table string) *sysDictionaryDetail
|
||||
s.CreatedAt = field.NewTime(table, "created_at")
|
||||
s.UpdatedAt = field.NewTime(table, "updated_at")
|
||||
s.DeletedAt = field.NewField(table, "deleted_at")
|
||||
s.Label = field.NewString(table, "label")
|
||||
s.Value = field.NewInt64(table, "value")
|
||||
s.Status = field.NewBool(table, "status")
|
||||
s.Sort = field.NewInt64(table, "sort")
|
||||
s.SysDictionaryID = field.NewInt64(table, "sys_dictionary_id")
|
||||
s.Label = field.NewString(table, "label")
|
||||
s.Value = field.NewString(table, "value")
|
||||
s.Status = field.NewBool(table, "status")
|
||||
s.Weight = field.NewInt64(table, "weight")
|
||||
|
||||
s.fillFieldMap()
|
||||
|
||||
@@ -109,11 +109,11 @@ func (s *sysDictionaryDetail) fillFieldMap() {
|
||||
s.fieldMap["created_at"] = s.CreatedAt
|
||||
s.fieldMap["updated_at"] = s.UpdatedAt
|
||||
s.fieldMap["deleted_at"] = s.DeletedAt
|
||||
s.fieldMap["sys_dictionary_id"] = s.SysDictionaryID
|
||||
s.fieldMap["label"] = s.Label
|
||||
s.fieldMap["value"] = s.Value
|
||||
s.fieldMap["status"] = s.Status
|
||||
s.fieldMap["sort"] = s.Sort
|
||||
s.fieldMap["sys_dictionary_id"] = s.SysDictionaryID
|
||||
s.fieldMap["weight"] = s.Weight
|
||||
}
|
||||
|
||||
func (s sysDictionaryDetail) clone(db *gorm.DB) sysDictionaryDetail {
|
||||
|
||||
Reference in New Issue
Block a user