# Generated by ariadne-codegen
# Source: operations/

from typing import Any, Optional

from pydantic import Field

from .base_model import BaseModel


class User(BaseModel):
    user: "UserUser"


class UserUser(BaseModel):
    id: Any = Field(alias="_id")
    name: str
    email: str
    language: str
    github_id: Optional[int] = Field(alias="githubID")
    discord_id: Optional[str] = Field(alias="discordID")
    avatar_url: str = Field(alias="avatarURL")
    created_at: Any = Field(alias="createdAt")
    email_preference: Any = Field(alias="emailPreference")
    referral_code: str = Field(alias="referralCode")
    username: str
    referred_by: Optional["UserUserReferredBy"] = Field(alias="referredBy")
    referral_reward_redeemed: bool = Field(alias="referralRewardRedeemed")
    passed_china_identity_verification: bool = Field(
        alias="passedChinaIdentityVerification"
    )
    phone: Optional[str]


class UserUserReferredBy(BaseModel):
    name: str
    avatar_url: str = Field(alias="avatarURL")


User.model_rebuild()
UserUser.model_rebuild()
