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