from pydantic import BaseModel
from typing import List, Optional


# --- Request / Response schemas ---

class UserCreate(BaseModel):
    email: str = ""
    display_name: str = ""
    photo_url: str = ""
    uid: str = ""
    phone_number: str = ""
    status: str = ""
    bio: str = ""
    userTitle: str = ""
    settingsPIN: str = ""
    quickSettingsPIN: str = ""


class UserUpdate(BaseModel):
    email: Optional[str] = None
    display_name: Optional[str] = None
    photo_url: Optional[str] = None
    phone_number: Optional[str] = None
    status: Optional[str] = None
    bio: Optional[str] = None
    userTitle: Optional[str] = None
    settingsPIN: Optional[str] = None
    quickSettingsPIN: Optional[str] = None


class UserInDB(UserCreate):
    id: str
    created_time: str = ""
    lastActive: str = ""
    createdAt: str = ""
    friendsList: List[str] = []
    friendsInvited: List[str] = []


class UserListResponse(BaseModel):
    users: List[UserInDB]
    total: int


class SetPasswordRequest(BaseModel):
    password: str


class ResetPasswordRequest(BaseModel):
    new_password: str = "Bell1234!"  # default reset value
