update mooc/models/core.py. 去除ims前缀
Signed-off-by: 雨过 <zxx1747362695@qq.com>
This commit is contained in:
parent
a03e66d004
commit
1fb0680418
@ -6,8 +6,8 @@ from mooc.db.database import Base
|
||||
|
||||
|
||||
|
||||
# ImsCoreAttachment模型用于映射数据库表ims_core_attachment
|
||||
class ImsCoreAttachment(Base):
|
||||
# CoreAttachment模型用于映射数据库表ims_core_attachment
|
||||
class CoreAttachment(Base):
|
||||
__tablename__ = "ims_core_attachment"
|
||||
|
||||
acid = Column(UnsignedInteger, primary_key=True) # 将id改为acid
|
||||
@ -24,8 +24,8 @@ class ImsCoreAttachment(Base):
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
# ImsCoreCache模型用于映射数据库表ims_core_cache
|
||||
class ImsCoreCache(Base):
|
||||
# CoreCache模型用于映射数据库表ims_core_cache
|
||||
class CoreCache(Base):
|
||||
__tablename__ = "ims_core_cache"
|
||||
|
||||
acid = Column(String(100), primary_key=True) # 将key视为一种特殊的主键,这里用acid替代原本的命名方式
|
||||
@ -34,8 +34,8 @@ class ImsCoreCache(Base):
|
||||
from_attributes = True
|
||||
|
||||
|
||||
# ImsCoreCron模型用于映射数据库表ims_core_cron
|
||||
class ImsCoreCron(Base):
|
||||
# CoreCron模型用于映射数据库表ims_core_cron
|
||||
class CoreCron(Base):
|
||||
__tablename__ = "ims_core_cron"
|
||||
acid = Column(UnsignedInteger, primary_key=True) # 将id改为acid
|
||||
cloudid = Column(UnsignedInteger, nullable=False)
|
||||
@ -60,8 +60,8 @@ class ImsCoreCron(Base):
|
||||
|
||||
|
||||
|
||||
# ImsCoreCronRecord模型用于映射数据库表ims_core_cron_record
|
||||
class ImsCoreCronRecord(Base):
|
||||
# CoreCronRecord模型用于映射数据库表ims_core_cron_record
|
||||
class CoreCronRecord(Base):
|
||||
__tablename__ = "ims_core_cron_record"
|
||||
acid = Column(UnsignedInteger, primary_key=True) # 将id改为acid
|
||||
uniacid = Column(UnsignedInteger, nullable=False)
|
||||
@ -76,8 +76,8 @@ class ImsCoreCronRecord(Base):
|
||||
from_attributes = True
|
||||
|
||||
|
||||
# ImsCoreJob模型用于映射数据库表ims_core_job
|
||||
class ImsCoreJob(Base):
|
||||
# CoreJob模型用于映射数据库表ims_core_job
|
||||
class CoreJob(Base):
|
||||
__tablename__ = "ims_core_job"
|
||||
acid = Column(Integer, primary_key=True) # 将id改为acid
|
||||
type = Column(TinyInt, nullable=False)
|
||||
@ -98,8 +98,8 @@ class ImsCoreJob(Base):
|
||||
|
||||
|
||||
|
||||
# ImsCoreMenu模型用于映射数据库表ims_core_menu
|
||||
class ImsCoreMenu(Base):
|
||||
# CoreMenu模型用于映射数据库表ims_core_menu
|
||||
class CoreMenu(Base):
|
||||
__tablename__ = "ims_core_menu"
|
||||
acid = Column(UnsignedInteger, primary_key=True) # 将id改为acid
|
||||
pid = Column(UnsignedInteger, nullable=False)
|
||||
@ -120,8 +120,8 @@ class ImsCoreMenu(Base):
|
||||
from_attributes = True
|
||||
|
||||
|
||||
# ImsCoreMenuShortcut模型用于映射数据库表ims_core_menu_shortcut
|
||||
class ImsCoreMenuShortcut(Base):
|
||||
# CoreMenuShortcut模型用于映射数据库表ims_core_menu_shortcut
|
||||
class CoreMenuShortcut(Base):
|
||||
__tablename__ = "ims_core_menu_shortcut"
|
||||
acid = Column(Integer, primary_key=True) # 将id改为acid
|
||||
uid = Column(Integer, nullable=False)
|
||||
@ -136,8 +136,8 @@ class ImsCoreMenuShortcut(Base):
|
||||
|
||||
|
||||
|
||||
# ImsCorePaylog模型用于映射数据库表ims_core_paylog
|
||||
class ImsCorePaylog(Base):
|
||||
# CorePaylog模型用于映射数据库表ims_core_paylog
|
||||
class CorePaylog(Base):
|
||||
__tablename__ = "ims_core_paylog"
|
||||
acid = Column(BigInt, primary_key=True, nullable=False) # 将plid改为acid,注意类型为BigInt
|
||||
type = Column(String(20), nullable=False)
|
||||
@ -161,8 +161,8 @@ class ImsCorePaylog(Base):
|
||||
from_attributes = True
|
||||
|
||||
|
||||
# ImsCorePerformance模型用于映射数据库表ims_core_performance
|
||||
class ImsCorePerformance(Base):
|
||||
# CorePerformance模型用于映射数据库表ims_core_performance
|
||||
class CorePerformance(Base):
|
||||
__tablename__ = "ims_core_performance"
|
||||
acid = Column(UnsignedInteger, primary_key=True) # 将id改为acid
|
||||
type = Column(TinyInt, nullable=False)
|
||||
@ -176,8 +176,8 @@ class ImsCorePerformance(Base):
|
||||
|
||||
|
||||
|
||||
# ImsCoreQueue模型用于映射数据库表ims_core_queue
|
||||
class ImsCoreQueue(Base):
|
||||
# CoreQueue模型用于映射数据库表ims_core_queue
|
||||
class CoreQueue(Base):
|
||||
__tablename__ = "ims_core_queue"
|
||||
acid = Column(BigInt, primary_key=True) # 将qid改为acid,类型对应BigInt
|
||||
uniacid = Column(UnsignedInteger, nullable=False)
|
||||
@ -194,8 +194,8 @@ class ImsCoreQueue(Base):
|
||||
from_attributes = True
|
||||
|
||||
|
||||
# ImsCoreRefundlog模型用于映射数据库表ims_core_refundlog
|
||||
class ImsCoreRefundlog(Base):
|
||||
# CoreRefundlog模型用于映射数据库表ims_core_refundlog
|
||||
class CoreRefundlog(Base):
|
||||
__tablename__ = "ims_core_refundlog"
|
||||
acid = Column(Integer, primary_key=True) # 将id改为acid
|
||||
uniacid = Column(Integer, nullable=False)
|
||||
@ -210,8 +210,8 @@ class ImsCoreRefundlog(Base):
|
||||
from_attributes = True
|
||||
|
||||
|
||||
# ImsCoreResource模型用于映射数据库表ims_core_resource
|
||||
class ImsCoreResource(Base):
|
||||
# CoreResource模型用于映射数据库表ims_core_resource
|
||||
class CoreResource(Base):
|
||||
__tablename__ = "ims_core_resource"
|
||||
acid = Column(Integer, primary_key=True) # 将mid改为acid
|
||||
uniacid = Column(UnsignedInteger, nullable=False)
|
||||
@ -225,8 +225,8 @@ class ImsCoreResource(Base):
|
||||
|
||||
|
||||
|
||||
# ImsCoreQueue模型用于映射数据库表ims_core_queue
|
||||
class ImsCoreQueue(Base):
|
||||
# CoreQueue模型用于映射数据库表ims_core_queue
|
||||
class CoreQueue(Base):
|
||||
__tablename__ = "ims_core_queue"
|
||||
acid = Column(BigInt, primary_key=True) # 将qid改为acid,类型对应BigInt
|
||||
uniacid = Column(UnsignedInteger, nullable=False)
|
||||
@ -243,8 +243,8 @@ class ImsCoreQueue(Base):
|
||||
from_attributes = True
|
||||
|
||||
|
||||
# ImsCoreRefundlog模型用于映射数据库表ims_core_refundlog
|
||||
class ImsCoreRefundlog(Base):
|
||||
# CoreRefundlog模型用于映射数据库表ims_core_refundlog
|
||||
class CoreRefundlog(Base):
|
||||
__tablename__ = "ims_core_refundlog"
|
||||
acid = Column(Integer, primary_key=True) # 将id改为acid
|
||||
uniacid = Column(Integer, nullable=False)
|
||||
@ -262,8 +262,8 @@ from sqlalchemy import Column, Integer, String, UnsignedInteger
|
||||
from mooc.db.database import Base
|
||||
|
||||
|
||||
# ImsCoreResource模型用于映射数据库表ims_core_resource
|
||||
class ImsCoreResource(Base):
|
||||
# CoreResource模型用于映射数据库表ims_core_resource
|
||||
class CoreResource(Base):
|
||||
__tablename__ = "ims_core_resource"
|
||||
acid = Column(Integer, primary_key=True) # 将mid改为acid
|
||||
uniacid = Column(UnsignedInteger, nullable=False)
|
||||
@ -278,8 +278,8 @@ class ImsCoreResource(Base):
|
||||
|
||||
|
||||
|
||||
# ImsCoreResource模型用于映射数据库表ims_core_resource
|
||||
class ImsCoreResource(Base):
|
||||
# CoreResource模型用于映射数据库表ims_core_resource
|
||||
class CoreResource(Base):
|
||||
__tablename__ = "ims_core_resource"
|
||||
acid = Column(Integer, primary_key=True) # 将mid改为acid
|
||||
uniacid = Column(UnsignedInteger, nullable=False)
|
||||
@ -291,8 +291,8 @@ class ImsCoreResource(Base):
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
# ImsCoreSendsmsLog模型用于映射数据库表ims_core_sendsms_log
|
||||
class ImsCoreSendsmsLog(Base):
|
||||
# CoreSendsmsLog模型用于映射数据库表ims_core_sendsms_log
|
||||
class CoreSendsmsLog(Base):
|
||||
__tablename__ = "ims_core_sendsms_log"
|
||||
acid = Column(UnsignedInteger, primary_key=True) # 将id改为acid
|
||||
uniacid = Column(UnsignedInteger, nullable=False)
|
||||
@ -308,8 +308,8 @@ from sqlalchemy import Column, Integer, String, UnsignedInteger
|
||||
from mooc.db.database import Base
|
||||
|
||||
|
||||
# ImsCoreSessions模型用于映射数据库表ims_core_sessions
|
||||
class ImsCoreSessions(Base):
|
||||
# CoreSessions模型用于映射数据库表ims_core_sessions
|
||||
class CoreSessions(Base):
|
||||
__tablename__ = "ims_core_sessions"
|
||||
acid = Column(CHAR(32), primary_key=True) # 将sid作为主键,对应类型为CHAR(32)
|
||||
uniacid = Column(UnsignedInteger, nullable=False)
|
||||
@ -319,8 +319,8 @@ class ImsCoreSessions(Base):
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
# ImsCoreSettings模型用于映射数据库表ims_core_settings
|
||||
class ImsCoreSettings(Base):
|
||||
# CoreSettings模型用于映射数据库表ims_core_settings
|
||||
class CoreSettings(Base):
|
||||
__tablename__ = "ims_core_settings"
|
||||
acid = Column(String(255), primary_key=True) # 将主键key改为acid
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user