This commit is contained in:
xxj
2022-07-05 20:35:17 +08:00
parent f47811a170
commit aa53e84c49
4 changed files with 7 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ type genColumns struct {
Key string `gorm:"column:Key"`
Desc string `gorm:"column:Comment"`
Null string `gorm:"column:Null"`
Extra string `gorm:"Extra"`
Default *string `gorm:"column:Default"`
}

View File

@@ -153,6 +153,7 @@ func (m *mysqlModel) getTableElement(orm *mysqldb.MySqlDB, tab string) (el []mod
var tmp model.ColumnsInfo
tmp.Name = v.Field
tmp.Type = v.Type
tmp.Extra = v.Extra
FixNotes(&tmp, v.Desc) // 分析表注释
if v.Default != nil {