# ✅ tasks

#### ✅ Task Model

**📄 Attributes:**

* 🆔 **id** (`Integer`): Unique identifier for the task (Primary Key).
* 📁 **project\_id** (`ForeignKey`): Reference to the project this task belongs to.
* 📝 **task\_title** (`String`): The title or short name of the task.
* 📄 **task\_description** (`Text`): A detailed explanation of the task’s purpose or content.
* 📊 **percentage\_complete** (`Float`): The percentage of task progress calculated by microtasks completed (e.g., 0.0 to 100.0).
* 🕒 **date\_created** (`DateTime`): Date and time when the task was created.
* 📅 **due\_date** (`DateTime`): Deadline for completing the task.
* 🚦 **status** (`enum type`): Current status of the task ("assigned" , "in\_progress" , "under\_review", "completed")

**🔗 Relationships:**

* 📁 **project**: Belongs to a `Project`.

***

#### 📎 TasksFile Model

The `TasksFile` model links files to specific tasks, enabling users to attach documents or media to a task.

**📄 Attributes:**

* 🆔 **id** (`Integer`): Unique identifier for the task-file relationship.
* ✅ **tasks\_id** (`ForeignKey`): The task to which the file is attached.
* 📂 **files\_id** (`ForeignKey`): The file being linked.

**🔗 Relationships:**

* 📂 **files**: The `File` attached.
* ✅ **tasks**: The `Task` to which the file is attached.

***

#### 💬 TaskComment Model

The `TaskComment` model stores user-generated comments on individual tasks, allowing for collaboration and communication.

**📄 Attributes:**

* 🆔 **id** (`Integer`): Unique identifier for the comment.
* 👤 **user\_id** (`ForeignKey`): The user who wrote the comment.
* ✅ **task\_id** (`ForeignKey`): The task this comment refers to.
* 🕒 **time\_posted** (`DateTime`): Timestamp of when the comment was made.
* ✏️ **content** (`Text`): The actual text content of the comment.

**🔗 Relationships:**

* 👤 **user**: The `User` who made the comment.
* ✅ **task**: The `Task` that the comment belongs to.

***

#### 📎💬 TaskCommentsFile Model

The `TaskCommentsFile` model links files to specific comments within tasks, allowing users to support their feedback with attachments.

**📄 Attributes:**

* 🆔 **id** (`Integer`): Unique identifier for the comment-file relationship.
* 💬 **task\_comments\_id** (`ForeignKey`): The comment to which the file is attached.
* 📂 **files\_id** (`ForeignKey`): The file being linked.

**🔗 Relationships:**

* 📂 **files**: The `File` attached.
* 💬 **task\_comments**: The `TaskComment` that this file belongs to.
