initial commit
This commit is contained in:
20
back/app/entity/models.py
Normal file
20
back/app/entity/models.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from enum import Enum
|
||||
from datetime import datetime
|
||||
from pydantic import Field
|
||||
|
||||
from beanie import Document
|
||||
|
||||
|
||||
class EntityType(str, Enum):
|
||||
individual = 'individual'
|
||||
corporation = 'corporation'
|
||||
institution = 'institution'
|
||||
|
||||
|
||||
class Entity(Document):
|
||||
_id: str
|
||||
type: EntityType
|
||||
name: str
|
||||
address: str
|
||||
created_at: datetime = Field(default=datetime.utcnow(), nullable=False)
|
||||
updated_at: datetime = Field(default_factory=datetime.utcnow, nullable=False)
|
||||
Reference in New Issue
Block a user