26 lines
No EOL
407 B
Python
26 lines
No EOL
407 B
Python
"""VoteMod models."""
|
|
from typing import Optional
|
|
|
|
from beanie import Document
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class Vote(BaseModel):
|
|
user: int
|
|
score: int
|
|
|
|
|
|
class Karma(Document):
|
|
user: int
|
|
karma: int = 1
|
|
revoked: bool = False
|
|
|
|
|
|
class VoteMod(Document):
|
|
initiator: int
|
|
target: int
|
|
message: int
|
|
content: str
|
|
attachments: list[str]
|
|
score: int
|
|
votes: list[Vote] |