From 4a876e2e64a690dcf01c385e273052e1e22caacd Mon Sep 17 00:00:00 2001 From: Kyomotoi Date: Mon, 13 Jun 2022 19:33:44 +0800 Subject: =?UTF-8?q?=F0=9F=9A=9A=20=E8=A7=84=E8=8C=83=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ATRI/database/models.py | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 ATRI/database/models.py (limited to 'ATRI/database/models.py') diff --git a/ATRI/database/models.py b/ATRI/database/models.py deleted file mode 100644 index b3953df..0000000 --- a/ATRI/database/models.py +++ /dev/null @@ -1,22 +0,0 @@ -""" - 定义SQLITE数据库的关系模式(表) - 数据库采用了tortoise orm,可以很好地支持异步 -""" - -from tortoise.models import Model -from tortoise import fields -from datetime import datetime - -# b站订阅表 -class Subscription(Model): - uid = fields.IntField(pk=True) # up的uid - groupid = fields.IntField() # 群号 - nickname = fields.TextField(null=True) # 订阅up的名称 - last_update = fields.DatetimeField( - default=datetime.fromordinal(1) - ) # 上一条动态更新时间 默认0001-01-01 00:00:00 - - def __str__(self): - return "[{nickname}|{uid}|{groupid}]".format( - nickname=self.nickname, uid=self.uid, groupid=self.groupid - ) -- cgit v1.2.3