-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignTask.cs
More file actions
32 lines (24 loc) · 968 Bytes
/
Copy pathAssignTask.cs
File metadata and controls
32 lines (24 loc) · 968 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace ProjectManagementSystem.Models
{
public class AssignTask
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int AssignTaskId { get; set; }
[Required]
[ForeignKey("TaskItem")]
public int TaskItemId { get; set; } // Task being assigned
public TaskItem TaskItem { get; set; } // Navigation Property
[Required]
[ForeignKey("Assigner")]
public string AssignerId { get; set; } // Who assigned the task
public ApplicationUser Assigner { get; set; } // Navigation Property
[Required]
[ForeignKey("Assignee")]
public string AssigneeId { get; set; } // Assigned user
public ApplicationUser Assignee { get; set; } // Navigation Property
public DateTime DateAssigned { get; set; } = DateTime.UtcNow;
}
}