2023-10-10 22:39:23 +02:00

12 lines
264 B
Python

from pydantic import BaseModel
from pydantic_mongo import AbstractRepository, ObjectIdField
class Users(BaseModel):
id: ObjectIdField = None
username: str
class UsersRepository(AbstractRepository[Users]):
class Meta:
collection_name = users