Files
resumeformatter/backend/app/schemas/person.py
2025-10-14 19:51:35 +05:30

35 lines
527 B
Python

from pydantic import BaseModel, Field, HttpUrl
class PersonBase(BaseModel):
"""
Base schema for a person
"""
firstName: str
lastName: str
linkedinUrl: str
class PersonCreate(PersonBase):
"""
Schema for creating a new person
"""
pass
class PersonInDBBase(PersonBase):
"""
Base schema for a person in the database
"""
id: str
class Config:
from_attributes = True
class Person(PersonInDBBase):
"""
Schema for returning a person
"""
pass