"description":"Create enum classes for task-related types in mnemo_cards_common. These enums will be shared between frontend and backend. Include TaskType (appInternal, external, social), TaskStatus (available, inProgress, completed, expired, failed), TaskDifficulty (easy, medium, hard), and RewardType (xp, coins, achievement). Use @JsonValue(int) for database enums as per project conventions.",
"title":"Create TaskRewardDto with JSON serialization",
"priority":"high",
"status":"pending",
"estimated_hours":2.0,
"description":"Create TaskRewardDto class in mnemo_cards_common following the existing DTO patterns. Include fields: type (RewardType), amount (int), achievementId (String?). Use @JsonSerializable(fieldRename: FieldRename.snake) and @CopyWith() annotations. Ensure proper JSON serialization/deserialization.",
"title":"Create TaskDto with all required fields",
"priority":"high",
"status":"pending",
"estimated_hours":3.0,
"description":"Create TaskDto class representing a task that can be shared between frontend and backend. Include fields: id (String), title (String), description (String), type (TaskType), difficulty (TaskDifficulty), rewards (List<TaskRewardDto>), status (TaskStatus), createdAt (DateTime), expiresAt (DateTime), completedAt (DateTime?), proofUrl (String?), instructions (String?), tags (List<String>?), imageUrl (String?). Use @JsonSerializable(fieldRename: FieldRename.snake) and @CopyWith(). Add computed properties: isExpired, isActive.",
"acceptance_criteria":[
"File created: lib/src/dtos/tasks/task_dto.dart",
"TaskDto includes all required fields with proper types",
"Uses @JsonSerializable and @CopyWith annotations",
"Computed properties isExpired and isActive work correctly",
"fromJson and toJson handle all fields including nullable ones",
"DTO exported in main library file",
"12+ unit tests cover serialization, deserialization, computed properties, and edge cases"
"title":"Create TaskProgressDto for user task progress tracking",
"priority":"high",
"status":"pending",
"estimated_hours":2.5,
"description":"Create TaskProgressDto class to track user progress on tasks. Include fields: userId (String), taskStatuses (Map<String, TaskStatus>), completedTasks (Map<String, DateTime>), totalXp (int), totalCoins (int), achievements (List<String>), lastUpdated (DateTime). Use @JsonSerializable(fieldRename: FieldRename.snake) and @CopyWith(). Handle Map serialization properly for taskStatuses and completedTasks.",
"title":"Create TasksQueryDto for filtering and pagination",
"priority":"medium",
"status":"pending",
"estimated_hours":2.0,
"description":"Create TasksQueryDto class for querying tasks with filters and pagination. Include optional fields: status (TaskStatus?), type (TaskType?), difficulty (TaskDifficulty?), tag (String?), limit (int?), offset (int?), onlyActive (bool?). Use @JsonSerializable(fieldRename: FieldRename.snake) and @CopyWith(). This DTO will be used for API request parameters.",
"title":"Create TaskCategoriesDto for task metadata",
"priority":"medium",
"status":"pending",
"estimated_hours":2.0,
"description":"Create TaskCategoriesDto class to represent available task categories and filters. Include fields: types (List<TaskType>), difficulties (List<TaskDifficulty>), tags (List<String>), totalTasks (int). Use @JsonSerializable(fieldRename: FieldRename.snake) and @CopyWith(). This DTO will be used to return available filter options to the frontend.",
"title":"Create TaskResultDto for task completion submissions",
"priority":"medium",
"status":"pending",
"estimated_hours":2.5,
"description":"Create TaskResultDto class for submitting task completion results. Include fields: taskId (String), userId (String), status (TaskStatus), submittedAt (DateTime), proofUrl (String?), notes (String?), approved (bool?), reviewedAt (DateTime?). Use @JsonSerializable(fieldRename: FieldRename.snake) and @CopyWith(). This DTO will be used for both request (submission) and response (review status) scenarios.",
"title":"Create tasks DTOs export file and update main library exports",
"priority":"high",
"status":"pending",
"estimated_hours":1.5,
"description":"Create an export file for all task-related DTOs (tasks/export.dart) and update the main library file (mnemo_cards_common.dart) to export all task DTOs. Ensure all DTOs are properly exported and accessible. Follow the existing export pattern used for other DTO groups (e.g., payment/export.dart).",
"acceptance_criteria":[
"File created: lib/src/dtos/tasks/export.dart",
"All task DTOs exported in tasks/export.dart",
"Main library file updated to export tasks/export.dart",
"All DTOs accessible via mnemo_cards_common import",
"title":"Run code generation and verify all task DTOs compile",
"priority":"high",
"status":"pending",
"estimated_hours":1.0,
"description":"Run build_runner to generate all JSON serialization code for task DTOs. Verify that all generated files compile correctly and there are no errors. Ensure all .g.dart files are generated properly. Run tests to verify everything works.",
"acceptance_criteria":[
"build_runner executed successfully: flutter pub run build_runner build --delete-conflicting-outputs",
"All .g.dart files generated for task DTOs",
"No compilation errors in generated code",
"All existing tests still pass",
"Linter passes with zero warnings for task DTO files"
],
"dependencies":["COMMON-008"],
"files_to_modify":[],
"component":"common"
},
{
"id":"COMMON-010",
"title":"Add comprehensive integration tests for task DTOs",
"priority":"medium",
"status":"pending",
"estimated_hours":2.5,
"description":"Create integration tests that verify task DTOs work together correctly. Test scenarios like: TaskDto with multiple TaskRewardDto, TaskProgressDto with complex task statuses, full round-trip serialization/deserialization, edge cases with null values, and compatibility between different DTO combinations.",
"acceptance_criteria":[
"Integration test file created: test/src/dtos/tasks/tasks_integration_test.dart",
"Tests cover DTO interactions and combinations",
"Tests verify round-trip serialization works correctly",