Description:
The MainTaskEntity represents the core data structure for a task within the application. It defines the properties and attributes that a task will have, serving as the blueprint for task data stored in the database. This entity is crucial for ensuring that task data is consistently structured across the application.
Inherited Attributes from BaseEntity:
id: A unique identifier for the task.
createdAt: The timestamp when the task was created.
createdBy: The identifier of the user who created the task.
description: A detailed description of the task.
Specific to MainTaskEntity:
title: A brief description of the task.
priority: The importance or urgency of the task (e.g., critical, high, medium, low, optional).
status: The current state of the task (e.g., not started = 1, in progress = 2, completed = 3).
dueDate: The deadline for completing the task.
updatedAt: The time when the task was last modified.
taskCategoriesId: The identifier of the category to which the task belongs.
colorCode: A color code associated with the task for visual representation.
iconCode: An icon code representing the task's type or nature.
fixedTagsId: Identifiers of fixed tags associated with the task.
tagsId: Identifiers of user-defined tags associated with the task.
superMainTaskId: The identifier of the parent task, if applicable.
dueTime: The specific time when the task is due.
repetitionInterval: The frequency of task repetition (e.g., daily, weekly, monthly).
repititionOnWeekDays: The days of the week on which the task repeats.
totalSpentTime: The total amount of time spent on the task.
Key behaviors:
Equality: Implement equals() method to determine if two MainTaskEntity objects are equal based on their attributes.
Validation: Consider adding validation rules to ensure that the MainTaskEntityis in a valid state before being persisted to the data store.
Hive Compatibility:
To ensure compatibility with Hive, the MainTaskEntity class should adhere to Hive's requirements:
Annotate attributes with Hive annotations: Use @HiveField() to specify the field names and types for Hive serialization.
Implement HiveType annotation: Annotate the class with @HiveType() to register it with Hive.
Consider using Hive's built-in types: For common data types like String, int, and bool, use Hive's built-in types to simplify serialization.
Handle complex data structures: For more complex data structures like lists or maps, use appropriate Hive adapters or custom serialization logic.
Description: The
MainTaskEntity
represents the core data structure for a task within the application. It defines the properties and attributes that a task will have, serving as the blueprint for task data stored in the database. This entity is crucial for ensuring that task data is consistently structured across the application.Inherited Attributes from BaseEntity:
id
: A unique identifier for the task.createdAt
: The timestamp when the task was created.createdBy
: The identifier of the user who created the task.description
: A detailed description of the task.Specific to MainTaskEntity:
title
: A brief description of the task.priority
: The importance or urgency of the task (e.g., critical, high, medium, low, optional).status
: The current state of the task (e.g., not started = 1, in progress = 2, completed = 3).dueDate
: The deadline for completing the task.updatedAt
: The time when the task was last modified.taskCategoriesId
: The identifier of the category to which the task belongs.colorCode
: A color code associated with the task for visual representation.iconCode
: An icon code representing the task's type or nature.fixedTagsId
: Identifiers of fixed tags associated with the task.tagsId
: Identifiers of user-defined tags associated with the task.superMainTaskId
: The identifier of the parent task, if applicable.dueTime
: The specific time when the task is due.repetitionInterval
: The frequency of task repetition (e.g., daily, weekly, monthly).repititionOnWeekDays
: The days of the week on which the task repeats.totalSpentTime
: The total amount of time spent on the task.Key behaviors:
MainTaskEntity
objects are equal based on their attributes.MainTaskEntity
is in a valid state before being persisted to the data store.Hive Compatibility:
To ensure compatibility with Hive, the MainTaskEntity class should adhere to Hive's requirements:
Annotate attributes with Hive annotations
: Use@HiveField()
to specify the field names and types for Hive serialization.Implement HiveType annotation
: Annotate the class with@HiveType()
to register it with Hive.Consider using Hive's built-in types
: For common data types like String, int, and bool, use Hive's built-in types to simplify serialization.Handle complex data structures
: For more complex data structures like lists or maps, use appropriate Hive adapters or custom serialization logic.