添加User.Avatar

This commit is contained in:
gazebo
2019-11-08 17:32:46 +08:00
parent 29e6559e17
commit a7164bb511
7 changed files with 51 additions and 2 deletions

View File

@@ -18,6 +18,7 @@ type UserBasic struct {
Mobile string `json:"mobile"`
Email string `json:"email"`
Name string `json:"name"`
Avatar string `json:"avatar"`
}
func (u *UserBasic) GetID() string {
@@ -39,6 +40,10 @@ func (u *UserBasic) GetName() string {
return u.Name
}
func (u *UserBasic) GetAvatar() string {
return u.Avatar
}
func (u *UserBasic) UpdateByIUser(user IUser) {
if user != nil {
u.UserID = user.GetID()
@@ -46,6 +51,7 @@ func (u *UserBasic) UpdateByIUser(user IUser) {
u.Mobile = user.GetMobile()
u.Email = user.GetEmail()
u.Name = user.GetName()
u.Avatar = user.GetAvatar()
}
}