from pydantic import BaseModel, Field
from datetime import datetime


class OtpModel(BaseModel):
    phone: str = Field(..., min_length=10, max_length=15)
    otpCode: str = Field(..., min_length=4, max_length=6)
    is_active: bool = True
    created_at: datetime = Field(default_factory=datetime.utcnow)