30 lines
1011 B
Python
30 lines
1011 B
Python
![]() |
from sqlalchemy import Column, Integer, String, Text
|
||
|
from mooc.db.database import Base
|
||
|
|
||
|
|
||
|
# ImsUserapiCache模型用于映射数据库表ims_userapi_cache
|
||
|
class ImsUserapiCache(Base):
|
||
|
__tablename__ = "ims_userapi_cache"
|
||
|
|
||
|
acid = Column(Integer, primary_key=True)
|
||
|
key = Column(String(32), nullable=False)
|
||
|
content = Column(Text, nullable=False)
|
||
|
lastupdate = Column(Integer, nullable=False)
|
||
|
|
||
|
class Config:
|
||
|
from_attributes = True
|
||
|
|
||
|
# ImsUserapiReply模型用于映射数据库表ims_userapi_reply
|
||
|
class ImsUserapiReply(Base):
|
||
|
__tablename__ = "ims_userapi_reply"
|
||
|
|
||
|
acid = Column(Integer, primary_key=True)
|
||
|
rid = Column(Integer, nullable=False)
|
||
|
description = Column(String(300), nullable=False)
|
||
|
apiurl = Column(String(300), nullable=False)
|
||
|
token = Column(String(32), nullable=False)
|
||
|
default_text = Column(String(100), nullable=False)
|
||
|
cachetime = Column(Integer, nullable=False)
|
||
|
|
||
|
class Config:
|
||
|
from_attributes = True
|