22 lines
468 B
Python
22 lines
468 B
Python
import uuid
|
|
|
|
from datetime import datetime
|
|
from pydantic import BaseModel, Field
|
|
|
|
from .models import Entity, EntityType, Individual, Corporation
|
|
from ..core.schemas import Writer
|
|
|
|
|
|
class EntityRead(Entity):
|
|
pass
|
|
|
|
|
|
class EntityCreate(Writer):
|
|
address: str
|
|
entity_data: Individual | Corporation = Field(..., discriminator='type')
|
|
|
|
|
|
class EntityUpdate(BaseModel):
|
|
address: str
|
|
entity_data: Individual | Corporation = Field(..., discriminator='type')
|