mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-19 09:14:27 +08:00
code refactor
This commit is contained in:
+3
-25
@@ -204,7 +204,7 @@ type UserProfileUpdateResponse struct {
|
|||||||
|
|
||||||
// UserProfileResponse represents a view-object of user profile
|
// UserProfileResponse represents a view-object of user profile
|
||||||
type UserProfileResponse struct {
|
type UserProfileResponse struct {
|
||||||
UserBasicInfo
|
*UserBasicInfo
|
||||||
LastLoginAt int64 `json:"lastLoginAt"`
|
LastLoginAt int64 `json:"lastLoginAt"`
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,30 +280,8 @@ func (u *User) ToUserBasicInfo() *UserBasicInfo {
|
|||||||
// ToUserProfileResponse returns a user profile view-object according to database model
|
// ToUserProfileResponse returns a user profile view-object according to database model
|
||||||
func (u *User) ToUserProfileResponse() *UserProfileResponse {
|
func (u *User) ToUserProfileResponse() *UserProfileResponse {
|
||||||
return &UserProfileResponse{
|
return &UserProfileResponse{
|
||||||
UserBasicInfo: UserBasicInfo{
|
UserBasicInfo: u.ToUserBasicInfo(),
|
||||||
Username: u.Username,
|
LastLoginAt: u.LastLoginUnixTime,
|
||||||
Email: u.Email,
|
|
||||||
Nickname: u.Nickname,
|
|
||||||
AvatarUrl: u.getAvatarUrl(),
|
|
||||||
AvatarProvider: u.getAvatarProvider(),
|
|
||||||
DefaultAccountId: u.DefaultAccountId,
|
|
||||||
TransactionEditScope: u.TransactionEditScope,
|
|
||||||
Language: u.Language,
|
|
||||||
DefaultCurrency: u.DefaultCurrency,
|
|
||||||
FirstDayOfWeek: u.FirstDayOfWeek,
|
|
||||||
LongDateFormat: u.LongDateFormat,
|
|
||||||
ShortDateFormat: u.ShortDateFormat,
|
|
||||||
LongTimeFormat: u.LongTimeFormat,
|
|
||||||
ShortTimeFormat: u.ShortTimeFormat,
|
|
||||||
DecimalSeparator: u.DecimalSeparator,
|
|
||||||
DigitGroupingSymbol: u.DigitGroupingSymbol,
|
|
||||||
DigitGrouping: u.DigitGrouping,
|
|
||||||
CurrencyDisplayType: u.CurrencyDisplayType,
|
|
||||||
ExpenseAmountColor: u.ExpenseAmountColor,
|
|
||||||
IncomeAmountColor: u.IncomeAmountColor,
|
|
||||||
EmailVerified: u.EmailVerified,
|
|
||||||
},
|
|
||||||
LastLoginAt: u.LastLoginUnixTime,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user