forked from UTSAVS26/PyVerse
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
21 lines (18 loc) · 709 Bytes
/
Copy pathmodels.py
File metadata and controls
21 lines (18 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from sqlalchemy import Column, Integer, String, Text, DateTime, func
from sqlalchemy.orm import declarative_base
Base = declarative_base()
class Ticket(Base):
__tablename__ = "tickets"
id = Column(Integer, primary_key=True, index=True)
user = Column(String, index=True)
message = Column(Text)
status = Column(String, default="open")
created_at = Column(DateTime, server_default=func.now())
class MessageLog(Base):
__tablename__ = "messages"
id = Column(Integer, primary_key=True, index=True)
user = Column(String, index=True)
intent = Column(String)
message = Column(Text)
response = Column(Text)
created_at = Column(DateTime, server_default=func.now())