delete SingularTable

删除单表配置模式
This commit is contained in:
xxj
2020-12-08 18:06:18 +08:00
parent a97443b09f
commit 3516c2b4a5
12 changed files with 33 additions and 53 deletions

View File

@@ -17,7 +17,6 @@ type Config struct {
Simple bool `yaml:"simple"`
IsWEBTag bool `yaml:"is_web_tag"`
IsWebTagPkHidden bool `yaml:"is_web_tag_pk_hidden"` // web标记是否隐藏主键
SingularTable bool `yaml:"singular_table"`
IsForeignKey bool `yaml:"is_foreign_key"`
IsOutSQL bool `yaml:"is_out_sql"`
IsOutFunc bool `yaml:"is_out_func"`
@@ -71,15 +70,15 @@ func GetOutDir() string {
return _map.OutDir
}
// SetSingularTable Set Disabled Table Name Plurals.设置禁用表名复数
func SetSingularTable(b bool) {
_map.SingularTable = b
}
// // SetSingularTable Set Disabled Table Name Plurals.设置禁用表名复数
// func SetSingularTable(b bool) {
// _map.SingularTable = b
// }
// GetSingularTable Get Disabled Table Name Plurals.获取禁用表名复数
func GetSingularTable() bool {
return _map.SingularTable
}
// // GetSingularTable Get Disabled Table Name Plurals.获取禁用表名复数
// func GetSingularTable() bool {
// return _map.SingularTable
// }
// GetSimple simple output.简单输出
func GetSimple() bool {

View File

@@ -31,17 +31,17 @@ var _map = Config{
Password: "root",
Database: "test",
},
OutDir: "./model",
URLTag: "json",
Language: "中 文",
DbTag: "gorm",
Simple: false,
IsWEBTag: false,
SingularTable: true,
IsForeignKey: true,
IsOutSQL: false,
IsOutFunc: true,
IsGUI: false,
OutDir: "./model",
URLTag: "json",
Language: "中 文",
DbTag: "gorm",
Simple: false,
IsWEBTag: false,
// SingularTable: true,
IsForeignKey: true,
IsOutSQL: false,
IsOutFunc: true,
IsGUI: false,
}
var configPath string

View File

@@ -13,7 +13,6 @@ service_displayname : #服务显示名
sercice_desc : #服务描述
is_dev : false # 是否开发者模式
out_dir : ./db # 输出目录
singular_table : true # 单表模式:true:禁用表名复数,false:采用表明复数 参考:gorm.SingularTable
simple : true #简单输出
isJsonTag : true #是否打json标记
mysql_info: