modify Answer table
This commit is contained in:
		
							parent
							
								
									272cb1b3bd
								
							
						
					
					
						commit
						fe32c7d394
					
				@ -77,21 +77,19 @@ class Answer(Base):
 | 
				
			|||||||
    """
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    __tablename__ = "T_ANSWER"
 | 
					    __tablename__ = "T_ANSWER"
 | 
				
			||||||
    ANSWER_ID = Column(Integer, primary_key=True, comment="ID of this answer")
 | 
					    QUESTION_TYPE_ID = Column(Integer, ForeignKey("T_QUESTION_TYPE.QUESTION_TYPE_ID"), primary_key=True, comment="Question type ID")
 | 
				
			||||||
    QA_TYPE = Column(Integer, comment="Question type ID")
 | 
					    NPC_ID = Column(Integer, ForeignKey("T_NPC.NPC_ID"), primary_key=True, comment="ID of the NPC that will say this answer")
 | 
				
			||||||
    NPC_ID = Column(Integer, ForeignKey("T_NPC.NPC_ID"), comment="ID of the NPC that will say this answer")
 | 
					 | 
				
			||||||
    TEXT_LID = Column(Integer, ForeignKey("T_LOCALE.LID"), comment="Text of the answer")
 | 
					    TEXT_LID = Column(Integer, ForeignKey("T_LOCALE.LID"), comment="Text of the answer")
 | 
				
			||||||
    LOCALE = relationship("Locale")
 | 
					    LOCALE = relationship("Locale")
 | 
				
			||||||
    NPC = relationship("Npc")
 | 
					    NPC = relationship("Npc")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, ANSWER_ID, QA_TYPE, NPC_ID, TEXT_LID):
 | 
					    def __init__(self, QUESTION_TYPE_ID, NPC_ID, TEXT_LID):
 | 
				
			||||||
        self.ANSWER_ID = ANSWER_ID
 | 
					        self.QUESTION_TYPE_ID = QUESTION_TYPE_ID
 | 
				
			||||||
        self.QA_TYPE = QA_TYPE
 | 
					 | 
				
			||||||
        self.NPC_ID = NPC_ID
 | 
					        self.NPC_ID = NPC_ID
 | 
				
			||||||
        self.TEXT_LID = TEXT_LID
 | 
					        self.TEXT_LID = TEXT_LID
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __str__(self):
 | 
					    def __str__(self):
 | 
				
			||||||
        return f"Answer(ANSWER_ID={self.ANSWER_ID}, QA_TYPE={self.QA_TYPE}, NPC_ID={self.NPC_ID}, TEXT_LID={self.TEXT_LID})"
 | 
					        return f"Answer(QUESTION_TYPE_ID={self.QUESTION_TYPE_ID}, NPC_ID={self.NPC_ID}, TEXT_LID={self.TEXT_LID})"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __repr__(self) -> str:
 | 
					    def __repr__(self) -> str:
 | 
				
			||||||
        return self.__str__()
 | 
					        return self.__str__()
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user