Archived
1
0
Fork 0
This repository has been archived on 2024-04-26. You can view files and clone it, but cannot push or open issues or pull requests.
akari-bot/modules/cytoid/orm.py
yzhh 171f3c840d serveral new feature for arcaea & cytoid modules
1. Sync BotArcAPIv5 changes
2. Add support for ArcaeaLimitedAPI by Lowiro
- ArcaeaLimitedAPI is now preferred, and use BotArcAPI when an error occurs or unofficial option is specified
3. ~arcaea bind & ~cytoid bind command
2022-01-20 01:02:23 +08:00

20 lines
543 B
Python

from sqlalchemy import Column, String, Text, TIMESTAMP, text
from sqlalchemy.dialects.mysql import LONGTEXT
from sqlalchemy.ext.declarative import declarative_base
from database.orm import DBSession
Base = declarative_base()
table_prefix = 'module_cytoid_'
db = DBSession()
session = db.session
engine = db.engine
class CytoidBindInfo(Base):
__tablename__ = table_prefix + 'CytoidBindInfo'
targetId = Column(String(512), primary_key=True)
username = Column(String(512))
Base.metadata.create_all(bind=engine, checkfirst=True)