19 lines
423 B
Python
19 lines
423 B
Python
from typing import Optional
|
|
from pydantic import BaseModel, Field
|
|
|
|
from .models import Entity, Institution, Individual, Corporation
|
|
from ..core.schemas import Writer
|
|
|
|
|
|
class EntityRead(Entity):
|
|
pass
|
|
|
|
|
|
class EntityCreate(Writer):
|
|
entity_data: Individual | Corporation | Institution = Field(..., discriminator='type')
|
|
address: str = Field(default="", title='Adresse')
|
|
|
|
|
|
class EntityUpdate(EntityCreate):
|
|
pass
|