diff --git a/app/models/tags.py b/app/models/tags.py new file mode 100644 index 0000000..db00299 --- /dev/null +++ b/app/models/tags.py @@ -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" \ No newline at end of file