35 lines
1.2 KiB
Python
35 lines
1.2 KiB
Python
from sqlalchemy import Column,Integer, String, Double
|
|
from sqlalchemy.ext.declarative import declarative_base
|
|
|
|
Base = declarative_base()
|
|
|
|
|
|
class JiaKaoBaoDian(Base):
|
|
__tablename__ = 'jiaKaoBaoDian'
|
|
|
|
id = Column(Integer, primary_key=True)
|
|
answer = Column(String)
|
|
media_content = Column(String, name="mediaContent")
|
|
question = Column(String)
|
|
question_id = Column(Integer, name="questionId")
|
|
option_a = Column(String, name="optionA")
|
|
option_b = Column(String, name="optionB")
|
|
option_c = Column(String, name="optionC")
|
|
option_d = Column(String, name="optionD")
|
|
option_e = Column(String, name="optionE")
|
|
option_f = Column(String, name="optionF")
|
|
option_g = Column(String, name="optionG")
|
|
option_h = Column(String, name="optionH")
|
|
keywords = Column(String)
|
|
illiteracy_explain = Column(String, name="illiteracyExplain")
|
|
concise_explain = Column(String, name="conciseExplain")
|
|
explain = Column(String)
|
|
knack = Column(String)
|
|
wrong_rate = Column(Double, name="wrongRate")
|
|
|
|
def to_json(self):
|
|
_dict = self.__dict__
|
|
if "_sa_instance_state" in _dict:
|
|
del _dict["_sa_instance_state"]
|
|
return _dict
|