مدل دادهای xKanban بر پایه ساختار سلسلهمراتبی Project → Board → Column → Card طراحی شده است. هر سطح از این سلسلهمراتب، موجودیت مستقلی با ویژگیها و روابط خاص خود دارد.
الف) مدل Project (پروژه)
Project {
id: "uuid",
title: "string",
description: "string",
createdAt: "ISO8601",
webhook: { enabled: boolean, url: "string" },
boards: [Board],
globalTags: [Tag]
}
ب) مدل Board (برد)
Board {
id: "uuid",
title: "string",
description: "string",
backgroundColor: "#hex",
columns: [Column]
}
ج) مدل Column (ستون)
Column {
id: "uuid",
title: "string",
backgroundColor: "#hex",
textColor: "#hex",
order: number,
cards: [Card]
}
د) مدل Card (کارت) - غنیترین موجودیت
Card {
id: "uuid",
title: "string",
description: "string",
dueDate: "ISO8601 | null",
backgroundColor: "#hex",
assignees: ["string"],
tags: ["tagId"],
dependencies: ["cardId"],
checklist: [{ text: "string", done: boolean }],
history: [{ timestamp, action, fromColumn, toColumn }]
}
⚠️ نکته طراحی مهم: استفاده از UUID برای شناسهها، امکان ادغام پروژهها، جلوگیری از تداخل شناسهها در عملیات Import/Export و پشتیبانی از همزمانی (Concurrency) را فراهم میآورد. این تصمیم برای مقیاسپذیری آینده حیاتی است.
روابط بین موجودیتها:
| رابطه |
نوع |
توضیح |
| Project → Boards |
One-to-Many |
هر پروژه میتواند چندین برد داشته باشد |
| Board → Columns |
One-to-Many |
هر برد شامل ستونهای متعدد است |
| Column → Cards |
One-to-Many |
هر ستون شامل کارتهای متعدد است |
| Card ↔ Card |
Many-to-Many |
وابستگی بین کارتها (Dependencies) |
| Card → Tags |
Many-to-Many |
کارتها میتوانند چندین برچسب داشته باشند |
| Card → Assignees |
Many-to-Many |
هر کارت میتواند چندین مسئول داشته باشد |