from typing import Optional
from pydantic import BaseModel



class RequestLogin(BaseModel):
    access_key: str
    password: str
    remember_me: Optional[bool]


class RequestVerifyOTP(BaseModel):
    token: str
    otp: str


class RequestSelectEmployee(BaseModel):
    uuid: str


class RequestResetPassword(BaseModel):
    password_token: str
    password: str
    re_password: str


class RequestSelectLiving(BaseModel):
    uuid: str

class RequestCreatePassword(BaseModel):
    password_token: str
    password: str
    re_password: str

    @property
    def is_valid(self):
        return self.password == self.re_password


class RequestChangePassword(BaseModel):
    old_password: str
    password: str
    re_password: str

    @property
    def is_valid(self):
        return self.password == self.re_password


class RequestForgotPasswordEmail(BaseModel):
    email: str


class RequestForgotPasswordPhone(BaseModel):
    phone_number: str
