yao/yao/models/chat.mod.yao
Max c74916296a Enhance model definitions and loading process for system models
- Added new system models for assistant, attachment, audit, chat, config, dsl, history, and kb with metadata including tags, built-in status, read-only attributes, and sort order.
- Refactored the model loading process to include a dedicated function for loading system models, improving organization and maintainability.
- Updated the application loading logic to set a default prefix for system tables, ensuring consistent naming conventions.
- Improved error handling during model loading and migration processes for better reliability.
2025-07-15 16:33:14 +08:00

68 lines
1.4 KiB
Text

{
"name": "chat",
"label": "Chat",
"description": "Chat table for storing chat metadata and information",
"tags": ["system"],
"builtin": true,
"readonly": true,
"sort": 9999,
"table": {
"name": "chat",
"comment": "Chat table"
},
"columns": [
{
"name": "id",
"type": "ID",
"label": "Chat ID",
"comment": "Unique chat identifier"
},
{
"name": "chat_id",
"type": "string",
"label": "Chat ID",
"comment": "Chat identifier",
"length": 200,
"nullable": false,
"unique": true,
"index": true
},
{
"name": "title",
"type": "string",
"label": "Title",
"comment": "Chat title",
"length": 200,
"nullable": true
},
{
"name": "assistant_id",
"type": "string",
"label": "Assistant ID",
"comment": "Assistant identifier",
"length": 200,
"nullable": true,
"index": true
},
{
"name": "sid",
"type": "string",
"label": "Session ID",
"comment": "Session identifier",
"length": 255,
"nullable": false,
"index": true
},
{
"name": "silent",
"type": "boolean",
"label": "Silent Mode",
"comment": "Whether this is a silent chat",
"default": false,
"index": true
}
],
"relations": {},
"indexes": [],
"option": { "timestamps": true, "soft_deletes": false }
}