syntax = "v1"

type Empty {}

type OkData {
	Ok      bool   `json:"ok"`
	Message string `json:"message,optional"`
}

type Pagination {
	Page       int   `json:"page"`
	PageSize   int   `json:"pageSize"`
	Total      int64 `json:"total"`
	TotalPages int   `json:"totalPages"`
}

// IdentityPublic — login channel bound to member
type IdentityPublic {
	LoginId     string `json:"login_id"`
	Platform    string `json:"platform"`
	AccountType string `json:"account_type"`
	CreatedAt   int64  `json:"created_at,optional"`
}

// MemberPublic — full profile (stand-alone user_info + Harbor Desk fields)
type MemberPublic {
	TenantId          string           `json:"tenant_id"`
	Uid               int64            `json:"uid"`
	Email             string           `json:"email"`
	Phone             string           `json:"phone,optional"`
	DisplayName       string           `json:"display_name"`
	Nickname          string           `json:"nickname,optional"`
	FullName          string           `json:"full_name,optional"`
	Roles             []string         `json:"roles"`
	Status            string           `json:"status"`
	EmailVerified     bool             `json:"email_verified"`
	EmailVerifiedAt   int64            `json:"email_verified_at,optional"`
	PhoneVerified     bool             `json:"phone_verified,optional"`
	PhoneVerifiedAt   int64            `json:"phone_verified_at,optional"`
	InviteCode        string           `json:"invite_code,optional"`
	ParentUid         int64            `json:"parent_uid,optional"`
	Bio               string           `json:"bio,optional"`
	Timezone          string           `json:"timezone,optional"`
	AvatarUrl         string           `json:"avatar_url,optional"`
	NotifyEmail       bool             `json:"notify_email,optional"`
	GenderCode        int              `json:"gender_code,optional"`
	Birthdate         int64            `json:"birthdate,optional"`
	National          string           `json:"national,optional"`
	Address           string           `json:"address,optional"`
	PostCode          string           `json:"post_code,optional"`
	PreferredLanguage string           `json:"preferred_language,optional"`
	Currency          string           `json:"currency,optional"`
	Identities        []IdentityPublic `json:"identities,optional"`
	JoinedAt          int64            `json:"joined_at,optional"`
	CreatedAt         int64            `json:"created_at,optional"`
	UpdatedAt         int64            `json:"updated_at,optional"`
}
