day day up

This commit is contained in:
谢小军
2020-01-08 20:21:30 +08:00
parent 0a32dfe0e3
commit 204164e8b9
9 changed files with 90 additions and 20 deletions

View File

@@ -54,3 +54,25 @@ func getUninStr(left, middle, right string) string {
}
return re
}
func getGormModelElement() []ColumusInfo {
var result []ColumusInfo
result = append(result, ColumusInfo{
BaseInfo: BaseInfo{Name: "id", Notes: "Primary key"},
Type: "int64", // Type.类型标记
Index: []KList{KList{Key: ColumusKeyPrimary}}, // index list.index列表
})
result = append(result, ColumusInfo{
BaseInfo: BaseInfo{Name: "created_at", Notes: "created time"},
Type: "time.Time", // Type.类型标记
})
result = append(result, ColumusInfo{
BaseInfo: BaseInfo{Name: "updated_at", Notes: "updated time"},
Type: "time.Time", // Type.类型标记
})
result = append(result, ColumusInfo{
BaseInfo: BaseInfo{Name: "deleted_at", Notes: "deleted time"},
Type: "time.Time", // Type.类型标记
})
return result
}