# user.py - Placeholder schemafrom pydantic import BaseModel
from typing import Optional, ClassVar
from pydantic import BaseModel, Field, validator

class UserSchema(BaseModel):
    social_id: Optional[str] = None
    email: Optional[str] = None
    signup_type: int  # 'google', 'facebook', etc.
    timezone: Optional[str] = None
    fullname: Optional[str] = None
    auth_key: Optional[str] = None
    profilepic: Optional[str] = None
    apple_id: Optional[str] = None
    # is_profile_completed: bool = False
    is_deleted: Optional[bool] = False
    # is_new_user: bool = True
    # List of valid signup_type values
    # Define signup_type_mapping as a class variable using ClassVar
     # Mapping for signup_type from integer to string


    # Ensure fullname is passed as a string (without encoding)
    @validator('fullname')
    def validate_fullname(cls, value):
        return value  # Return the value as is (no encoding required)

    class Config:
        from_attributes = True
