Spaces:
Running
Running
axeronis commited on
Commit ·
8fc12b3
1
Parent(s): ad48ce3
fix: Define Message.status as String column to prevent Enum LookupError
Browse files
backend/app/models/lead.py
CHANGED
|
@@ -157,7 +157,8 @@ class Message(SQLModel, table=True):
|
|
| 157 |
content: str
|
| 158 |
|
| 159 |
# Status
|
| 160 |
-
|
|
|
|
| 161 |
|
| 162 |
# AI metadata
|
| 163 |
prompt_tokens: Optional[int] = None
|
|
|
|
| 157 |
content: str
|
| 158 |
|
| 159 |
# Status
|
| 160 |
+
# Status
|
| 161 |
+
status: MessageStatus = Field(default=MessageStatus.SENT, sa_column=Column(String(20))) # Default to SENT for backward compatibility
|
| 162 |
|
| 163 |
# AI metadata
|
| 164 |
prompt_tokens: Optional[int] = None
|