List and Read on frontend, fullecrud on back
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user