add config with is_db_tag

This commit is contained in:
zsinx
2021-08-25 12:55:30 +08:00
parent 4ffb3e8ac3
commit 896e1d498b
4 changed files with 65 additions and 33 deletions

View File

@@ -16,6 +16,7 @@ type Config struct {
Language string `yaml:"language"` // language
DbTag string `yaml:"db_tag"` // 数据库标签gormt,db
Simple bool `yaml:"simple"`
IsDbTag bool `yaml:"is_db_tag"` // 是否输出 数据库标签
IsWEBTag bool `yaml:"is_web_tag"`
IsWebTagPkHidden bool `yaml:"is_web_tag_pk_hidden"` // web标记是否隐藏主键
IsForeignKey bool `yaml:"is_foreign_key"`
@@ -98,6 +99,16 @@ func SetSimple(b bool) {
_map.Simple = b
}
// GetIsDbTag is_db_tag
func GetIsDbTag() bool {
return _map.IsDbTag
}
// SetIsDbTag is_db_tag
func SetIsDbTag(b bool) {
_map.IsDbTag = b
}
// GetIsWEBTag json tag.json标记
func GetIsWEBTag() bool {
return _map.IsWEBTag