# from pydantic import BaseModel, EmailStr, Field
# from typing import Optional
# from datetime import datetime


# class UserModel(BaseModel):
#     phone: str = Field(..., min_length=10, max_length=15)
#     password: str  # store hashed password later (IMPORTANT)
#     is_active: bool = True
#     created_at: datetime = datetime.utcnow()

from pydantic import BaseModel, Field
from datetime import datetime

class UserModel(BaseModel):
    phone: str = Field(
        ...,
        min_length=10,
        max_length=15
    )

    password: str

    is_active: bool = True

    created_at: datetime = Field(
        default_factory=datetime.utcnow
    )