feat(Task): implement user ownership for tasks and enhance related services
- Added ownerId field to Task model to associate tasks with users. - Updated TaskService methods to enforce user ownership in task operations. - Enhanced API routes to include user authentication and ownership checks. - Modified DailyService and analytics services to filter tasks by user. - Integrated user session handling in various components for personalized task management.
This commit is contained in:
@@ -23,6 +23,7 @@ model User {
|
||||
preferences UserPreferences?
|
||||
notes Note[]
|
||||
dailyCheckboxes DailyCheckbox[]
|
||||
tasks Task[] @relation("TaskOwner")
|
||||
|
||||
@@map("users")
|
||||
}
|
||||
@@ -41,7 +42,9 @@ model Task {
|
||||
updatedAt DateTime @updatedAt
|
||||
jiraProject String?
|
||||
jiraKey String?
|
||||
assignee String?
|
||||
assignee String? // Legacy field - keep for Jira/TFS compatibility
|
||||
ownerId String // Required - chaque tâche appartient à un user
|
||||
owner User @relation("TaskOwner", fields: [ownerId], references: [id], onDelete: Cascade)
|
||||
jiraType String?
|
||||
tfsProject String?
|
||||
tfsPullRequestId Int?
|
||||
|
||||
Reference in New Issue
Block a user