- Fix hermes_services.json with proper four-section format (summary/fields/indexes/codes) - Fix hermes_service_sessions.json with proper four-section format - Update CRUD definitions to match actual table fields - Remove non-existent fields (user_id, api_key) from service table - Add proper indexes and field constraints - Follow database-table-definition-spec exactly
96 lines
2.6 KiB
JSON
96 lines
2.6 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "hermes_service_sessions",
|
|
"title": "Hermes Service Sessions",
|
|
"primary": "id",
|
|
"catelog": "relation"
|
|
}
|
|
],
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"title": "Session ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no",
|
|
"comments": "Primary key - UUID format"
|
|
},
|
|
{
|
|
"name": "service_id",
|
|
"title": "Service ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no",
|
|
"comments": "Foreign key to hermes_services.id"
|
|
},
|
|
{
|
|
"name": "user_id",
|
|
"title": "User ID",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no",
|
|
"comments": "User who created the session"
|
|
},
|
|
{
|
|
"name": "session_data",
|
|
"title": "Session Data",
|
|
"type": "text",
|
|
"nullable": "yes",
|
|
"comments": "Serialized session state or metadata"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"title": "Status",
|
|
"type": "str",
|
|
"length": 32,
|
|
"nullable": "no",
|
|
"default": "active",
|
|
"comments": "Session status: active, closed, expired"
|
|
},
|
|
{
|
|
"name": "created_at",
|
|
"title": "Created At",
|
|
"type": "timestamp",
|
|
"nullable": "no",
|
|
"comments": "Session creation timestamp"
|
|
},
|
|
{
|
|
"name": "updated_at",
|
|
"title": "Updated At",
|
|
"type": "timestamp",
|
|
"nullable": "yes",
|
|
"comments": "Session last activity timestamp"
|
|
},
|
|
{
|
|
"name": "closed_at",
|
|
"title": "Closed At",
|
|
"type": "timestamp",
|
|
"nullable": "yes",
|
|
"comments": "Session closure timestamp"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"name": "idx_hermes_sessions_service_id",
|
|
"idxtype": "index",
|
|
"idxfields": ["service_id"]
|
|
},
|
|
{
|
|
"name": "idx_hermes_sessions_user_id",
|
|
"idxtype": "index",
|
|
"idxfields": ["user_id"]
|
|
},
|
|
{
|
|
"name": "idx_hermes_sessions_status",
|
|
"idxtype": "index",
|
|
"idxfields": ["status"]
|
|
},
|
|
{
|
|
"name": "idx_hermes_sessions_created_at",
|
|
"idxtype": "index",
|
|
"idxfields": ["created_at"]
|
|
}
|
|
],
|
|
"codes": []
|
|
} |