2021-07-30 19:32:58 +00:00
|
|
|
from sqlalchemy import Column, String, Text, TIMESTAMP, text
|
|
|
|
from sqlalchemy.dialects.mysql import LONGTEXT
|
2021-07-28 18:51:24 +00:00
|
|
|
|
2022-06-13 04:49:22 +00:00
|
|
|
from database.orm import Session
|
|
|
|
from database.orm_base import Base
|
2021-07-28 18:51:24 +00:00
|
|
|
|
2021-07-30 19:32:58 +00:00
|
|
|
table_prefix = 'module_wiki_'
|
2022-06-13 04:49:22 +00:00
|
|
|
db = Session
|
2021-08-24 16:49:19 +00:00
|
|
|
session = db.session
|
|
|
|
engine = db.engine
|
2021-07-30 19:32:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
class WikiTargetSetInfo(Base):
|
|
|
|
__tablename__ = table_prefix + 'TargetSetInfo'
|
2023-01-26 13:21:46 +00:00
|
|
|
__table_args__ = {'extend_existing': True}
|
2021-07-30 19:32:58 +00:00
|
|
|
targetId = Column(String(512), primary_key=True)
|
2021-08-24 12:44:26 +00:00
|
|
|
link = Column(LONGTEXT if session.bind.dialect.name == 'mysql' else Text)
|
|
|
|
iws = Column(LONGTEXT if session.bind.dialect.name == 'mysql' else Text)
|
|
|
|
headers = Column(LONGTEXT if session.bind.dialect.name == 'mysql' else Text)
|
2021-12-19 08:23:24 +00:00
|
|
|
prefix = Column(LONGTEXT if session.bind.dialect.name == 'mysql' else Text)
|
2021-07-30 19:32:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
class WikiInfo(Base):
|
|
|
|
__tablename__ = table_prefix + 'WikiInfo'
|
2023-01-26 13:21:46 +00:00
|
|
|
__table_args__ = {'extend_existing': True}
|
2021-07-30 19:32:58 +00:00
|
|
|
apiLink = Column(String(512), primary_key=True)
|
|
|
|
siteInfo = Column(LONGTEXT if session.bind.dialect.name == 'mysql' else Text)
|
|
|
|
timestamp = Column(TIMESTAMP, default=text('CURRENT_TIMESTAMP'))
|
|
|
|
|
2021-11-01 15:54:12 +00:00
|
|
|
|
2021-11-15 16:26:11 +00:00
|
|
|
class WikiAllowList(Base):
|
|
|
|
__tablename__ = table_prefix + 'WikiAllowList'
|
2023-01-26 13:21:46 +00:00
|
|
|
__table_args__ = {'extend_existing': True}
|
2021-11-15 16:34:36 +00:00
|
|
|
apiLink = Column(String(512), primary_key=True)
|
2021-09-21 08:22:29 +00:00
|
|
|
operator = Column(String(512))
|
2021-07-30 19:32:58 +00:00
|
|
|
|
2021-11-01 15:54:12 +00:00
|
|
|
|
2021-11-17 13:17:13 +00:00
|
|
|
class WikiBlockList(Base):
|
|
|
|
__tablename__ = table_prefix + 'WikiBlockList'
|
2023-01-26 13:21:46 +00:00
|
|
|
__table_args__ = {'extend_existing': True}
|
2021-11-17 13:17:13 +00:00
|
|
|
apiLink = Column(String(512), primary_key=True)
|
|
|
|
operator = Column(String(512))
|
|
|
|
|
|
|
|
|
2022-06-13 04:49:22 +00:00
|
|
|
Session.create()
|