fix: update incorrect default name when parse dest model field.

This commit is contained in:
zhengyb 2024-11-02 17:57:47 +08:00
parent deceebfab8
commit 3fd61eeb32

View File

@ -125,7 +125,7 @@ func (schema *Schema) ParseField(fieldStruct reflect.StructField) *Field {
Readable: true,
PrimaryKey: utils.CheckTruth(tagSetting["PRIMARYKEY"], tagSetting["PRIMARY_KEY"]),
AutoIncrement: utils.CheckTruth(tagSetting["AUTOINCREMENT"]),
HasDefaultValue: utils.CheckTruth(tagSetting["AUTOINCREMENT"]),
HasDefaultValue: utils.CheckTruth(tagSetting["DEFAULT"]),
NotNull: utils.CheckTruth(tagSetting["NOT NULL"], tagSetting["NOTNULL"]),
Unique: utils.CheckTruth(tagSetting["UNIQUE"]),
Comment: tagSetting["COMMENT"],