29 lines
650 B
Python
29 lines
650 B
Python
# Importações de bibliotecas padrão
|
|
from datetime import datetime
|
|
from typing import List, Optional
|
|
from uuid import UUID as UuidType
|
|
|
|
|
|
# Importações de bibliotecas de terceiros
|
|
from pydantic import BaseModel, ConfigDict
|
|
|
|
|
|
class UuidMixinSchema(BaseModel):
|
|
uuid: UuidType = None
|
|
|
|
|
|
class UuidsMixinSchema(BaseModel):
|
|
uuids: List[UuidType] = None
|
|
|
|
|
|
class TimestampMixinSchema(BaseModel):
|
|
created_at: datetime | None = None
|
|
updated_at: datetime | None = None
|
|
|
|
|
|
class UUIDSchema(BaseModel):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
uuid: UuidType
|
|
|
|
class RegistroAtivo(UuidMixinSchema):
|
|
ativo: Optional[bool] = None |