summaryrefslogtreecommitdiff
path: root/ATRI/database/models.py
blob: e268f01fffca7240d5d510d477b177d777b1d45d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from datetime import datetime

from tortoise import fields
from tortoise.models import Model


class BilibiliSubscription(Model):
    uid = fields.IntField()
    group_id = fields.IntField()
    up_nickname = fields.TextField(null=True)
    last_update = fields.DatetimeField(default=datetime.fromordinal(1))


class TwitterSubscription(Model):
    tid = fields.IntField()
    group_id = fields.IntField()
    name = fields.TextField(null=True)
    screen_name = fields.TextField(null=True)
    last_update = fields.DatetimeField(default=datetime.fromordinal(1))