From dcf37c3802b68f1533de8d5774c60015efdb652c Mon Sep 17 00:00:00 2001 From: xxj <346944475@qq.com> Date: Wed, 15 Jun 2022 20:21:34 +0800 Subject: [PATCH] add commit --- data/view/model/common.go | 2 +- data/view/model/model.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/data/view/model/common.go b/data/view/model/common.go index 7467953..6a14cc8 100755 --- a/data/view/model/common.go +++ b/data/view/model/common.go @@ -180,7 +180,7 @@ func buildFList(list *[]FList, key ColumnsKey, keyName, tp, colName string) { *list = append(*list, FList{ Key: key, KeyName: keyName, - Kem: []FEm{FEm{ + Kem: []FEm{{ Type: tp, ColName: colName, ColStructName: getCamelName(colName), diff --git a/data/view/model/model.go b/data/view/model/model.go index a96912b..7a23c54 100755 --- a/data/view/model/model.go +++ b/data/view/model/model.go @@ -192,6 +192,9 @@ func (m *_Model) genTableElement(cols []ColumnsInfo) (el []genstruct.GenElement) if len(v.Gormt) > 0 { tmp.AddTag(_tagGorm, v.Gormt) } + if len(v.Notes) > 0 { + tmp.AddTag(_tagGorm, fmt.Sprintf("comment:'%v'", v.Notes)) + } } else { tmp.AddTag(_tagGorm, "column:"+v.Name) }