调整模板格式

This commit is contained in:
白茶清欢 2024-04-14 21:38:53 +08:00
parent e399558fd1
commit e8d19587f3

View File

@ -179,15 +179,15 @@ func generateTableColumnDefined(modelStructName string, columnList []*sqlparser.
structFieldCommentInstanceResult += "}" structFieldCommentInstanceResult += "}"
tableColumnFunction := ` tableColumnFunction := `
// Columns 获取表字段定义 // Columns 获取表字段定义
func ({TABLE_FIRST} {MODEL_STRUCT_NAME}) Columns() *{COLUMN_DEFINED} { func ({TABLE_FIRST} {MODEL_STRUCT_NAME}) Columns() *{COLUMN_DEFINED} {
return {STRUCT_FIELD_DESC_DEFINED_RESULT} return {STRUCT_FIELD_DESC_DEFINED_RESULT}
} }
// ColumnComment 获取表字段描述 // ColumnComment 获取表字段描述
func ({TABLE_FIRST} {MODEL_STRUCT_NAME}) ColumnComment() map[string]string { func ({TABLE_FIRST} {MODEL_STRUCT_NAME}) ColumnComment() map[string]string {
return {STRUCT_FIELD_COMMENT_DEFINED_RESULT} return {STRUCT_FIELD_COMMENT_DEFINED_RESULT}
} }
` `
dataMap := map[string]string{ dataMap := map[string]string{
"{COLUMN_DEFINED}": columnDefineName, "{COLUMN_DEFINED}": columnDefineName,