rework new fields
This commit is contained in:
@@ -4,9 +4,6 @@ from typing import List, Optional
|
||||
from pydantic import BaseModel, Field, ConfigDict
|
||||
from pydantic.types import UUID4
|
||||
|
||||
from personal_info.db.models import Address, Document
|
||||
|
||||
|
||||
class PersonBase(BaseModel):
|
||||
first_name: str
|
||||
last_name: str
|
||||
@@ -55,6 +52,26 @@ class Contact(BaseModel):
|
||||
value: str
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
class Address(BaseModel):
|
||||
category: str
|
||||
region: str
|
||||
city: str
|
||||
street: str
|
||||
house: str
|
||||
flat: str
|
||||
class Config:
|
||||
orm_mode = True
|
||||
class Document(BaseModel):
|
||||
category: str
|
||||
series: str
|
||||
number: str
|
||||
issued_by: str
|
||||
issued_at: str
|
||||
attachments: List[str]
|
||||
class Config:
|
||||
orm_mode = True
|
||||
|
||||
class Person(BaseModel):
|
||||
id: UUID4
|
||||
first_name: str
|
||||
|
||||
Reference in New Issue
Block a user