From 039050f631a891145958d889858cce1effec7c98 Mon Sep 17 00:00:00 2001 From: young <605887476@qq.com> Date: Thu, 7 Jan 2021 22:43:29 +0800 Subject: [PATCH] fix: old error --- data/view/model/model.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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))