967 lines
24 KiB
JSON
967 lines
24 KiB
JSON
{
|
|
"version": "5",
|
|
"dialect": "mysql",
|
|
"id": "7d5a0ac2-340e-4028-9e15-2516188db481",
|
|
"prevId": "19c68417-6ca1-4df0-9f19-89364c61dd84",
|
|
"tables": {
|
|
"agentAccessControl": {
|
|
"name": "agentAccessControl",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"agentId": {
|
|
"name": "agentId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"tool": {
|
|
"name": "tool",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"isAllowed": {
|
|
"name": "isAllowed",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"maxExecutionsPerHour": {
|
|
"name": "maxExecutionsPerHour",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 100
|
|
},
|
|
"timeoutSeconds": {
|
|
"name": "timeoutSeconds",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 30
|
|
},
|
|
"allowedPatterns": {
|
|
"name": "allowedPatterns",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "('[]')"
|
|
},
|
|
"blockedPatterns": {
|
|
"name": "blockedPatterns",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "('[]')"
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"agentAccessControl_agentId_tool_idx": {
|
|
"name": "agentAccessControl_agentId_tool_idx",
|
|
"columns": [
|
|
"agentId",
|
|
"tool"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"agentAccessControl_id": {
|
|
"name": "agentAccessControl_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"agentHistory": {
|
|
"name": "agentHistory",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"agentId": {
|
|
"name": "agentId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"userMessage": {
|
|
"name": "userMessage",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"agentResponse": {
|
|
"name": "agentResponse",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"conversationId": {
|
|
"name": "conversationId",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"messageIndex": {
|
|
"name": "messageIndex",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "enum('pending','success','error')",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "'pending'"
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"agentHistory_agentId_idx": {
|
|
"name": "agentHistory_agentId_idx",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"agentHistory_id": {
|
|
"name": "agentHistory_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"agentMetrics": {
|
|
"name": "agentMetrics",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"agentId": {
|
|
"name": "agentId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"requestId": {
|
|
"name": "requestId",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"userMessage": {
|
|
"name": "userMessage",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"agentResponse": {
|
|
"name": "agentResponse",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"inputTokens": {
|
|
"name": "inputTokens",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"outputTokens": {
|
|
"name": "outputTokens",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"totalTokens": {
|
|
"name": "totalTokens",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"processingTimeMs": {
|
|
"name": "processingTimeMs",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "enum('success','error','timeout','rate_limited')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"errorMessage": {
|
|
"name": "errorMessage",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"toolsCalled": {
|
|
"name": "toolsCalled",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "('[]')"
|
|
},
|
|
"model": {
|
|
"name": "model",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"temperature": {
|
|
"name": "temperature",
|
|
"type": "decimal(3,2)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"agentMetrics_agentId_idx": {
|
|
"name": "agentMetrics_agentId_idx",
|
|
"columns": [
|
|
"agentId"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"agentMetrics_createdAt_idx": {
|
|
"name": "agentMetrics_createdAt_idx",
|
|
"columns": [
|
|
"createdAt"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"agentMetrics_id": {
|
|
"name": "agentMetrics_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"agentMetrics_requestId_unique": {
|
|
"name": "agentMetrics_requestId_unique",
|
|
"columns": [
|
|
"requestId"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"agents": {
|
|
"name": "agents",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"userId": {
|
|
"name": "userId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"model": {
|
|
"name": "model",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"provider": {
|
|
"name": "provider",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"temperature": {
|
|
"name": "temperature",
|
|
"type": "decimal(3,2)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "'0.7'"
|
|
},
|
|
"maxTokens": {
|
|
"name": "maxTokens",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 2048
|
|
},
|
|
"topP": {
|
|
"name": "topP",
|
|
"type": "decimal(3,2)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "'1.0'"
|
|
},
|
|
"frequencyPenalty": {
|
|
"name": "frequencyPenalty",
|
|
"type": "decimal(3,2)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "'0.0'"
|
|
},
|
|
"presencePenalty": {
|
|
"name": "presencePenalty",
|
|
"type": "decimal(3,2)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "'0.0'"
|
|
},
|
|
"systemPrompt": {
|
|
"name": "systemPrompt",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"allowedTools": {
|
|
"name": "allowedTools",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "('[]')"
|
|
},
|
|
"allowedDomains": {
|
|
"name": "allowedDomains",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "('[]')"
|
|
},
|
|
"maxRequestsPerHour": {
|
|
"name": "maxRequestsPerHour",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 100
|
|
},
|
|
"isActive": {
|
|
"name": "isActive",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"isPublic": {
|
|
"name": "isPublic",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"isSystem": {
|
|
"name": "isSystem",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"isOrchestrator": {
|
|
"name": "isOrchestrator",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"tags": {
|
|
"name": "tags",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "('[]')"
|
|
},
|
|
"metadata": {
|
|
"name": "metadata",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "('{}')"
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"agents_userId_idx": {
|
|
"name": "agents_userId_idx",
|
|
"columns": [
|
|
"userId"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"agents_model_idx": {
|
|
"name": "agents_model_idx",
|
|
"columns": [
|
|
"model"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"agents_id": {
|
|
"name": "agents_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"browserSessions": {
|
|
"name": "browserSessions",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"sessionId": {
|
|
"name": "sessionId",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"agentId": {
|
|
"name": "agentId",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"currentUrl": {
|
|
"name": "currentUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "enum('active','idle','closed','error')",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "'idle'"
|
|
},
|
|
"screenshotUrl": {
|
|
"name": "screenshotUrl",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"lastActionAt": {
|
|
"name": "lastActionAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"closedAt": {
|
|
"name": "closedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"browserSessions_id": {
|
|
"name": "browserSessions_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"browserSessions_sessionId_unique": {
|
|
"name": "browserSessions_sessionId_unique",
|
|
"columns": [
|
|
"sessionId"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"nodeMetrics": {
|
|
"name": "nodeMetrics",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"containerId": {
|
|
"name": "containerId",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"containerName": {
|
|
"name": "containerName",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"cpuPercent": {
|
|
"name": "cpuPercent",
|
|
"type": "decimal(6,2)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'0.00'"
|
|
},
|
|
"memUsedMb": {
|
|
"name": "memUsedMb",
|
|
"type": "decimal(10,2)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'0.00'"
|
|
},
|
|
"memLimitMb": {
|
|
"name": "memLimitMb",
|
|
"type": "decimal(10,2)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'0.00'"
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "varchar(32)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'running'"
|
|
},
|
|
"recordedAt": {
|
|
"name": "recordedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"nodeMetrics_containerId_idx": {
|
|
"name": "nodeMetrics_containerId_idx",
|
|
"columns": [
|
|
"containerId"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"nodeMetrics_recordedAt_idx": {
|
|
"name": "nodeMetrics_recordedAt_idx",
|
|
"columns": [
|
|
"recordedAt"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"nodeMetrics_id": {
|
|
"name": "nodeMetrics_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"toolDefinitions": {
|
|
"name": "toolDefinitions",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"toolId": {
|
|
"name": "toolId",
|
|
"type": "varchar(100)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"category": {
|
|
"name": "category",
|
|
"type": "varchar(50)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'custom'"
|
|
},
|
|
"dangerous": {
|
|
"name": "dangerous",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"parameters": {
|
|
"name": "parameters",
|
|
"type": "json",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"implementation": {
|
|
"name": "implementation",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"isActive": {
|
|
"name": "isActive",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"createdBy": {
|
|
"name": "createdBy",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"toolDefinitions_id": {
|
|
"name": "toolDefinitions_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"toolDefinitions_toolId_unique": {
|
|
"name": "toolDefinitions_toolId_unique",
|
|
"columns": [
|
|
"toolId"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"users": {
|
|
"name": "users",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"openId": {
|
|
"name": "openId",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "varchar(320)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"loginMethod": {
|
|
"name": "loginMethod",
|
|
"type": "varchar(64)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"role": {
|
|
"name": "role",
|
|
"type": "enum('user','admin')",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'user'"
|
|
},
|
|
"createdAt": {
|
|
"name": "createdAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
},
|
|
"updatedAt": {
|
|
"name": "updatedAt",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"onUpdate": true,
|
|
"default": "(now())"
|
|
},
|
|
"lastSignedIn": {
|
|
"name": "lastSignedIn",
|
|
"type": "timestamp",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(now())"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"users_id": {
|
|
"name": "users_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"users_openId_unique": {
|
|
"name": "users_openId_unique",
|
|
"columns": [
|
|
"openId"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
}
|
|
},
|
|
"views": {},
|
|
"_meta": {
|
|
"schemas": {},
|
|
"tables": {},
|
|
"columns": {}
|
|
},
|
|
"internal": {
|
|
"tables": {},
|
|
"indexes": {}
|
|
}
|
|
} |