12 lines
264 B
Python
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 |