add models tags
This commit is contained in:
parent
0f8a5b32b0
commit
1afcd626ea
24
app/models/tags.py
Normal file
24
app/models/tags.py
Normal file
@ -0,0 +1,24 @@
|
||||
from pydantic import BaseModel, EmailStr
|
||||
from pydantic_mongo import AbstractRepository, ObjectIdField
|
||||
from datetime import datetime, date
|
||||
|
||||
class Tags(BaseModel):
|
||||
id: ObjectIdField = None
|
||||
name: str
|
||||
created_at: datetime = datetime.today()
|
||||
|
||||
class TagsOut(BaseModel):
|
||||
id: ObjectIdField = None
|
||||
name: str
|
||||
|
||||
|
||||
class TagsIn(BaseModel):
|
||||
name: str
|
||||
|
||||
class EventIDS(BaseModel):
|
||||
ids: list[str]
|
||||
|
||||
|
||||
class TagsRepository(AbstractRepository[Tags]):
|
||||
class Meta:
|
||||
collection_name = "tags"
|
Loading…
x
Reference in New Issue
Block a user