List and Read on frontend, fullecrud on back

This commit is contained in:
2023-01-10 18:48:47 +01:00
parent 399b52a272
commit 0b8a93b256
32 changed files with 623 additions and 51 deletions
Binary file not shown.
Binary file not shown.
+3
View File
@@ -18,3 +18,6 @@ class Entity(Document):
address: str
created_at: datetime = Field(default=datetime.utcnow(), nullable=False)
updated_at: datetime = Field(default_factory=datetime.utcnow, nullable=False)
#
# class Settings:
# name = "entities"
+2 -1
View File
@@ -4,13 +4,14 @@ from datetime import datetime
from pydantic import BaseModel
from .models import Entity, EntityType
from ..core.schemas import Writer
class EntityRead(Entity):
pass
class EntityCreate(BaseModel):
class EntityCreate(Writer):
type: EntityType
name: str
address: str