app-cloudep-member-server/pkg/domain/entity/user.go

31 lines
1.6 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package entity
import (
"app-cloudep-member-server/pkg/domain/member"
"go.mongodb.org/mongo-driver/bson/primitive"
)
type User struct {
ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"`
UID string `bson:"uid"` // 用戶 UID
AvatarURL *string `bson:"avatar_url,omitempty"` // 頭像 URL可選
FullName *string `bson:"full_name,omitempty"` // 用戶全名
Nickname *string `bson:"nickname,omitempty"` // 暱稱(可選)
GenderCode *int64 `bson:"gender_code,omitempty"` // 性別代碼
Birthdate *int64 `bson:"birthdate,omitempty"` // 生日 (格式: 19930417)
Address *string `bson:"address,omitempty"` // 地址
AlarmCategory member.AlarmType `bson:"alarm_category"` // 告警狀態
UserStatus member.Status `bson:"user_status"` // 用戶狀態
PreferredLanguage string `bson:"preferred_language"` // 使用語言
Currency string `bson:"currency"` // 使用幣種
PhoneNumber *string `bson:"phone_number,omitempty"` // 電話 (驗證後才會出現)
Email *string `bson:"email,omitempty"` // 信箱 (驗證後才會出現)
UpdateAt *int64 `bson:"update_at,omitempty" json:"update_at,omitempty"`
CreateAt *int64 `bson:"create_at,omitempty" json:"create_at,omitempty"`
}
func (u *User) CollectionName() string {
return "user_info"
}