|
|
@ -12,9 +12,10 @@ type Config struct {
|
|
|
|
CfgBase `yaml:"base"`
|
|
|
|
CfgBase `yaml:"base"`
|
|
|
|
DBInfo DBInfo `yaml:"db_info"`
|
|
|
|
DBInfo DBInfo `yaml:"db_info"`
|
|
|
|
OutDir string `yaml:"out_dir"`
|
|
|
|
OutDir string `yaml:"out_dir"`
|
|
|
|
URLTag string `yaml:"url_tag"` // url tag
|
|
|
|
URLTag string `yaml:"url_tag"` // url tag
|
|
|
|
Language string `yaml:"language"` // language
|
|
|
|
Language string `yaml:"language"` // language
|
|
|
|
DbTag string `yaml:"db_tag"` // 数据库标签(gormt,db)
|
|
|
|
DbTag string `yaml:"db_tag"` // 数据库标签(gormt,db)
|
|
|
|
|
|
|
|
UserGormModel bool `yaml:"user_gorm_model"` //model是否使用gorm.Model
|
|
|
|
Simple bool `yaml:"simple"`
|
|
|
|
Simple bool `yaml:"simple"`
|
|
|
|
IsWEBTag bool `yaml:"is_web_tag"`
|
|
|
|
IsWEBTag bool `yaml:"is_web_tag"`
|
|
|
|
IsWebTagPkHidden bool `yaml:"is_web_tag_pk_hidden"` // web标记是否隐藏主键
|
|
|
|
IsWebTagPkHidden bool `yaml:"is_web_tag_pk_hidden"` // web标记是否隐藏主键
|
|
|
@ -209,6 +210,11 @@ func SetDBTag(s string) {
|
|
|
|
_map.DbTag = s
|
|
|
|
_map.DbTag = s
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// GetUserGormModel get `use gorm.Model or not`.
|
|
|
|
|
|
|
|
func GetUserGormModel() bool {
|
|
|
|
|
|
|
|
return _map.UserGormModel
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// SetIsNullToPoint if with null to porint in struct
|
|
|
|
// SetIsNullToPoint if with null to porint in struct
|
|
|
|
func SetIsNullToPoint(b bool) {
|
|
|
|
func SetIsNullToPoint(b bool) {
|
|
|
|
_map.IsNullToPoint = b
|
|
|
|
_map.IsNullToPoint = b
|
|
|
|