登录功能完成

This commit is contained in:
2022-10-04 00:36:01 +08:00
parent 26278707bb
commit 968eab9b06
31 changed files with 1022 additions and 36 deletions

18
pkg/dto/user.go Normal file
View File

@@ -0,0 +1,18 @@
package dto
import (
"mc-client-updater-server/pkg/dao/entity"
"strings"
)
type User struct {
Username string
Roles []string
}
func UserEntity2DTO(user *entity.User) *User {
return &User{
Username: user.Username,
Roles: strings.Split(user.Roles, ","),
}
}