33 lines
653 B
Python
33 lines
653 B
Python
"""Twitter database models."""
|
|
from datetime import datetime
|
|
|
|
from beanie import Document
|
|
|
|
from jarvis_core.db.utils import NowField
|
|
|
|
|
|
class TwitterAccount(Document):
|
|
"""Twitter Account object."""
|
|
|
|
handle: str
|
|
twitter_id: int
|
|
last_tweet: int
|
|
last_sync: datetime = NowField()
|
|
|
|
class Setting:
|
|
name = "twitteraccount"
|
|
|
|
|
|
class TwitterFollow(Document):
|
|
"""Twitter Follow object."""
|
|
|
|
active: bool = True
|
|
twitter_id: int
|
|
channel: int
|
|
guild: int
|
|
retweets: bool = True
|
|
admin: int
|
|
created_at: datetime = NowField()
|
|
|
|
class Setting:
|
|
name = "twitterfollow"
|