from pydantic import BaseModel
from typing import Optional

class UserBase(BaseModel):
    nickname: Optional[str] = None
    remark: Optional[str] = None
    wechat_number: Optional[str] = None
    wxid: Optional[str] = None
    gender: Optional[str] = None
    friendaddtime: Optional[str] = None
    openid: Optional[str] = None
    ebook: Optional[bool] = None  # 新增电子书字段
    activity_status: Optional[str] = None  # 新增活动报名字段
    vip_member: Optional[bool] = None  # 新增VIP会员字段
    verification_code: Optional[bool] = None  #新增验证码字段


class UserCreate(UserBase):
    pass

class UserUpdate(UserBase):
    pass

class User(UserBase):
    id: int

    class Config:
        # orm_mode = True
        from_attributes = True
