This commit is contained in:
白茶清欢 2023-07-31 14:20:48 +08:00
parent 537f028d2a
commit 0f28427811
2 changed files with 7 additions and 4 deletions

View File

@ -17,7 +17,8 @@ type MysqlConfig struct {
Port int `json:"port" gorm:"port" ini:"port" xml:"port" yaml:"port"` // 端口
Username string `json:"username" gorm:"username" ini:"username" xml:"username" yaml:"username"` // 用户名
Password string `json:"password" gorm:"password" ini:"password" xml:"password" yaml:"password"` // 密码
Charset string `json:"charset" gorm:"charset" ini:"charset" xml:"charset" yaml:"charset"` // 编码
Timezone string `json:"timezone" gorm:"timezone" ini:"timezone" xml:"timezone" yaml:"timezone"` // 时区
}
// LoggerConfig 日志配置

View File

@ -13,9 +13,11 @@ package define
//
// Date : 21:04 2023/7/29
type Database struct {
Driver string `json:"driver"` // 数据库驱动 : 暂时支持 mysql / sqlite
Flag string `json:"flag"` // 数据库标识, 全局唯一
Config map[string]interface{} `json:"config"` // 数据库的配置
Driver string `json:"driver" gorm:"driver" ini:"driver" xml:"driver" yaml:"driver"` // 数据库驱动 : 暂时支持 mysql / sqlite
Flag string `json:"flag" gorm:"flag" ini:"flag" xml:"flag" yaml:"flag"` // 数据库标识, 全局唯一
Description string `json:"description" gorm:"description" ini:"description" xml:"description" yaml:"description"` // 数据库描述
Logger *LoggerConfig `json:"logger" gorm:"logger" ini:"logger" xml:"logger" yaml:"logger"` // 日志配置
Config map[string]interface{} `json:"config" gorm:"config" ini:"config" xml:"config" yaml:"config"` // 数据库的配置
}
// Table 数据表结构