-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAllocation.cs
More file actions
45 lines (41 loc) · 1.32 KB
/
Allocation.cs
File metadata and controls
45 lines (41 loc) · 1.32 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Developer_Allocation_Management
{
[Table("tbl_allocation")]
public class Allocation
{
public Int64 Id { get; set; }
public DateTime Start { get; set; }
public DateTime Termination { get; set; }
public Byte HoursWeekly { get; set; }
public Decimal Remuneration { get; set; }
[Required]
public Developer Developer { get; set; }
[Required]
public Project Project { get; set; }
public List<Task> Tasks { get; set; }
public Allocation()
{
Tasks = new List<Task>();
}
public Allocation (DateTime start, DateTime termination, byte hoursWeekly, decimal remuneration, Developer developer, Project project) : this()
{
Start = start;
Termination = termination;
HoursWeekly = hoursWeekly;
Remuneration = remuneration;
Developer = developer;
Project = project;
}
public override string ToString()
{
return $"{Developer}, Start: {Start.ToString("dd-MM-yyyy")}";
}
}
}