Add Intern schema
This commit is contained in:
parent
c39af3d01d
commit
07c1570437
16
schemas/intern.py
Normal file
16
schemas/intern.py
Normal file
@ -0,0 +1,16 @@
|
||||
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
|
Loading…
x
Reference in New Issue
Block a user