from __future__ import annotations

from datetime import datetime

from pydantic import BaseModel, Field

from app.schemas.user import UserProfile


class SendSmsRequest(BaseModel):
    phone: str = Field(min_length=11, max_length=20)


class LoginRequest(BaseModel):
    phone: str = Field(min_length=11, max_length=20)
    code: str = Field(min_length=4, max_length=8)


class LoginResponse(BaseModel):
    token: str
    expiredAt: datetime
    user: UserProfile
