This commit is contained in:
HibiKier
2022-08-21 13:37:03 +08:00
parent 40fed798a1
commit 7efcff13bb
37 changed files with 1977 additions and 967 deletions
+20
View File
@@ -0,0 +1,20 @@
from services.db_context import db
from typing import List
class WordBank(db.Model):
__tablename__ = "word_bank"
user_qq = db.Column(db.BigInteger(), nullable=False)
group_id = db.Column(db.Integer())
search_type = db.Column(db.Integer(), nullable=False, default=0)
problem = db.Column(db.String(), nullable=False)
answer = db.Column(db.String(), nullable=False)
format = db.Column(db.String())
create_time = db.Column(db.DateTime(), nullable=False)
update_time = db.Column(db.DateTime(), nullable=False)
@classmethod
async def get_all(cls) -> List['WordBank']:
return await cls.query.gino.all()