-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTask.cs
More file actions
62 lines (51 loc) · 1.33 KB
/
Task.cs
File metadata and controls
62 lines (51 loc) · 1.33 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace PayrollEngine.Client.Tutorial.WebhookConsumer;
/// <summary>
/// Payroll task
/// </summary>
public class Task : ApiObject
{
/// <summary>
/// The task name (immutable)
/// </summary>
[Required]
[StringLength(128)]
public string Name { get; set; }
/// <summary>
/// The task category
/// </summary>
[StringLength(128)]
public string Category { get; set; }
/// <summary>
/// The task instruction
/// </summary>
[Required]
public string Instruction { get; set; }
/// <summary>
/// The scheduled user id
/// </summary>
[Required]
public int ScheduledUserId { get; set; }
/// <summary>
/// The task schedule date
/// </summary>
[Required]
public DateTime Scheduled { get; set; }
/// <summary>
/// The completed user id
/// </summary>
public int? CompletedUserId { get; set; }
/// <summary>
/// The task completed date
/// </summary>
public DateTime? Completed { get; set; }
/// <summary>
/// Custom attributes
/// </summary>
public Dictionary<string, object> Attributes { get; set; }
/// <inheritdoc/>
public override string ToString() =>
$"{Name}: {Scheduled} {base.ToString()}";
}