update environment mode handling, refactor user registration logic, and add username/email existence checks

This commit is contained in:
2025-07-22 10:04:42 +08:00
parent 08872ea015
commit f07200b0b9
7 changed files with 51 additions and 24 deletions

View File

@ -13,8 +13,7 @@ type User struct {
Email string `gorm:"uniqueIndex"`
Gender string
Role string `gorm:"default:'user'"`
Password string // 密码,存储加密后的值
Password string // 密码,存储加密后的值
}
func (user *User) ToDto() *dto.UserDto {