JaveaAI / project /bot /models.py
brestok's picture
Upload 40 files
0632cd1 verified
raw
history blame contribute delete
511 Bytes
from sqlalchemy import Column, String, Integer
from project.database import Base
class MessagePair(Base):
__tablename__ = 'message_pair'
id = Column(Integer, primary_key=True, index=True, autoincrement=True)
user_message = Column(String)
bot_response = Column(String)
country = Column(String, default='Undefined')
def __init__(self, user_message, bot_response, country):
self.user_message = user_message
self.bot_response = bot_response
self.country = country