43 lines
1.7 KiB
Go
43 lines
1.7 KiB
Go
package entity
|
|
|
|
import "go.mongodb.org/mongo-driver/bson/primitive"
|
|
|
|
const CollectionName = "members"
|
|
|
|
type Status string
|
|
|
|
const (
|
|
StatusOpen Status = "open"
|
|
StatusSuspended Status = "suspended"
|
|
StatusDeleted Status = "deleted"
|
|
)
|
|
|
|
type Origin string
|
|
|
|
const (
|
|
OriginNative Origin = "native"
|
|
)
|
|
|
|
type Member struct {
|
|
ID primitive.ObjectID `bson:"_id,omitempty"`
|
|
TenantID string `bson:"tenant_id"`
|
|
UID string `bson:"uid"`
|
|
Email string `bson:"email"`
|
|
DisplayName string `bson:"display_name,omitempty"`
|
|
Avatar string `bson:"avatar,omitempty"`
|
|
Phone string `bson:"phone,omitempty"`
|
|
Language string `bson:"language,omitempty"`
|
|
Currency string `bson:"currency,omitempty"`
|
|
Status Status `bson:"status"`
|
|
Origin Origin `bson:"origin"`
|
|
PasswordHash string `bson:"password_hash,omitempty"`
|
|
Roles []string `bson:"roles,omitempty"`
|
|
ActiveThreadsAccountID string `bson:"active_threads_account_id,omitempty"`
|
|
BusinessEmail string `bson:"business_email,omitempty"`
|
|
BusinessEmailVerified bool `bson:"business_email_verified"`
|
|
BusinessPhone string `bson:"business_phone,omitempty"`
|
|
BusinessPhoneVerified bool `bson:"business_phone_verified"`
|
|
CreateAt int64 `bson:"create_at"`
|
|
UpdateAt int64 `bson:"update_at"`
|
|
}
|