105 lines
2.3 KiB
YAML
105 lines
2.3 KiB
YAML
{
|
|
"task_id": "task_create_model_task",
|
|
"entity_id": "model_task",
|
|
"generated_at": "2025-12-18T01:57:52.721911",
|
|
"workflow_version": "v001",
|
|
"target": {
|
|
"type": "model",
|
|
"definition": {
|
|
"id": "model_task",
|
|
"name": "Task",
|
|
"description": "Available tasks for earning points",
|
|
"file_path": "app/lib/db/schema/task.ts",
|
|
"status": "PENDING",
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "Unique task identifier (UUID)",
|
|
"constraints": [
|
|
"primary_key"
|
|
]
|
|
},
|
|
{
|
|
"name": "type",
|
|
"type": "enum",
|
|
"required": true,
|
|
"description": "Task category",
|
|
"enum_values": [
|
|
"checkin",
|
|
"ad",
|
|
"survey",
|
|
"referral",
|
|
"quiz",
|
|
"video",
|
|
"reading"
|
|
]
|
|
},
|
|
{
|
|
"name": "title",
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "Task display title"
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "string",
|
|
"required": true,
|
|
"description": "Task description"
|
|
},
|
|
{
|
|
"name": "points_reward",
|
|
"type": "integer",
|
|
"required": true,
|
|
"description": "Points awarded upon completion"
|
|
},
|
|
{
|
|
"name": "is_active",
|
|
"type": "boolean",
|
|
"required": true,
|
|
"description": "Whether task is currently available"
|
|
}
|
|
],
|
|
"indexes": [
|
|
{
|
|
"fields": [
|
|
"type",
|
|
"is_active"
|
|
],
|
|
"unique": false
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"related": {
|
|
"models": [],
|
|
"apis": [],
|
|
"components": []
|
|
},
|
|
"dependencies": {
|
|
"entity_ids": [],
|
|
"definitions": []
|
|
},
|
|
"files": {
|
|
"to_create": [
|
|
"prisma/schema.prisma",
|
|
"app/models/task.ts"
|
|
],
|
|
"reference": []
|
|
},
|
|
"acceptance": [
|
|
{
|
|
"criterion": "Model defined in Prisma schema",
|
|
"verification": "Check prisma/schema.prisma"
|
|
},
|
|
{
|
|
"criterion": "TypeScript types exported",
|
|
"verification": "Import type in test file"
|
|
},
|
|
{
|
|
"criterion": "Relations properly configured",
|
|
"verification": "Check Prisma relations"
|
|
}
|
|
]
|
|
} |