diff --git a/data/view/model/model.go b/data/view/model/model.go index eaf20b7..75e1638 100644 --- a/data/view/model/model.go +++ b/data/view/model/model.go @@ -101,9 +101,10 @@ func (m *_Model) genTableElement(cols []ColumnsInfo) (el []genstruct.GenElement) case ColumnsKeyUnique: // unique key.唯一索引 tmp.AddTag(_tagGorm, "unique") case ColumnsKeyIndex: // index key.复合索引 - tmp.AddTag(_tagGorm, getUninStr("index", ":", v1.KeyName)) - if v1.KeyType == "FULLTEXT" { - tmp.AddTag(_tagGorm, "class:FULLTEXT") + if v1.KeyType=="FULLTEXT" { + tmp.AddTag(_tagGorm, getUninStr("index", ":", v1.KeyName)+",class:FULLTEXT") + }else{ + tmp.AddTag(_tagGorm, getUninStr("index", ":", v1.KeyName)) } case ColumnsKeyUniqueIndex: // unique index key.唯一复合索引 tmp.AddTag(_tagGorm, getUninStr("uniqueIndex", ":", v1.KeyName))