hng-68xxzk/schemas/intern.py
2025-03-26 12:37:15 +01:00

16 lines
593 B
Python

from pydantic import BaseModel, Field, EmailStr
class InternBase(BaseModel):
first_name: str = Field(..., description="Intern's first name")
last_name: str = Field(..., description="Intern's last name")
email: EmailStr = Field(..., description="Intern's email address")
phone_number: str = Field(..., description="Intern's phone number")
track: str = Field(..., description="Intern's track")
bio: str | None = Field(None, description="Intern's bio")
class InternCreate(InternBase):
pass
class InternResponse(InternBase):
class Config:
orm_mode = True