add autoIncrement

This commit is contained in:
xxj
2022-07-06 18:41:33 +08:00
parent fc112a736b
commit 3dea08f1e4
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 {