Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -43,12 +43,15 @@ func (i *InitDB) PgsqlEmptyDsn() string {
|
||||
// Author [SliverHorn](https://github.com/SliverHorn)
|
||||
func (i *InitDB) ToMysqlConfig() config.Mysql {
|
||||
return config.Mysql{
|
||||
Path: i.Host,
|
||||
Port: i.Port,
|
||||
Dbname: i.DBName,
|
||||
Username: i.UserName,
|
||||
Password: i.Password,
|
||||
Config: "charset=utf8mb4&parseTime=True&loc=Local",
|
||||
Path: i.Host,
|
||||
Port: i.Port,
|
||||
Dbname: i.DBName,
|
||||
Username: i.UserName,
|
||||
Password: i.Password,
|
||||
MaxIdleConns: 10,
|
||||
MaxOpenConns: 100,
|
||||
LogMode: "error",
|
||||
Config: "charset=utf8mb4&parseTime=True&loc=Local",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,11 +59,14 @@ func (i *InitDB) ToMysqlConfig() config.Mysql {
|
||||
// Author [SliverHorn](https://github.com/SliverHorn)
|
||||
func (i *InitDB) ToPgsqlConfig() config.Pgsql {
|
||||
return config.Pgsql{
|
||||
Path: i.Host,
|
||||
Port: i.Port,
|
||||
Dbname: i.DBName,
|
||||
Username: i.UserName,
|
||||
Password: i.Password,
|
||||
Config: "sslmode=disable TimeZone=Asia/Shanghai",
|
||||
Path: i.Host,
|
||||
Port: i.Port,
|
||||
Dbname: i.DBName,
|
||||
Username: i.UserName,
|
||||
Password: i.Password,
|
||||
MaxIdleConns: 10,
|
||||
MaxOpenConns: 100,
|
||||
LogMode: "error",
|
||||
Config: "sslmode=disable TimeZone=Asia/Shanghai",
|
||||
}
|
||||
}
|
||||
|
@@ -18,4 +18,6 @@ type SysUser struct {
|
||||
AuthorityId string `json:"authorityId" gorm:"default:888;comment:用户角色ID"` // 用户角色ID
|
||||
Authority SysAuthority `json:"authority" gorm:"foreignKey:AuthorityId;references:AuthorityId;comment:用户角色"`
|
||||
Authorities []SysAuthority `json:"authorities" gorm:"many2many:sys_user_authority;"`
|
||||
Phone string `json:"phone" gorm:"comment:用户手机号"` // 用户角色ID
|
||||
Email string `json:"email" gorm:"comment:用户邮箱"` // 用户邮箱
|
||||
}
|
||||
|
Reference in New Issue
Block a user