-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAcceptanceRequest.cs
54 lines (47 loc) · 1.33 KB
/
AcceptanceRequest.cs
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
using AO.Models;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using UserVoice.Database.Conventions;
namespace UserVoice.Database
{
public enum Response
{
/// <summary>
/// no response yet
/// </summary>
Pending = 0,
/// <summary>
/// item is accepted
/// </summary>
Accepted = 1,
/// <summary>
/// item not accepted (please provide reason)
/// </summary>
Rejected = 2,
/// <summary>
/// acceptance request row not created
/// </summary>
Unassigned = -1
}
/// <summary>
/// associates an item with a user, representing a request for sign-off on a test item
/// </summary>
public class AcceptanceRequest : BaseEntity
{
[Key]
[References(typeof(Item))]
public int ItemId { get; set; }
/// <summary>
/// must be a user who allows acceptance testing
/// </summary>
[Key]
[References(typeof(User))]
public int UserId { get; set; }
public Response Response { get; set; } = Response.Pending;
public string Comments { get; set; }
[NotMapped]
public string UserName { get; set; }
[NotMapped]
public string Email { get; set; }
}
}