Test plan incomplete, basic compaints support

This commit is contained in:
Dimitar Byalkov
2023-06-09 02:57:45 +02:00
parent 53c42a35d8
commit d8e185757d
32 changed files with 1294 additions and 42 deletions

View File

@@ -7,6 +7,10 @@ namespace Models
{
public class Complaint : GenericMessage
{
public Complaint()
{
}
public Complaint(int id, User author, string description, string title, DateTime publishDate, ComplaintStatus status, ComplaintSeverity severity) : base(id, author, description, title, publishDate)
{
Status = status;
@@ -27,5 +31,9 @@ namespace Models
{
get;set;
}
public override string ToString()
{
return $"({PublishDate.ToString("d")} - {Author.Name}) {Title}";
}
}
}

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
@@ -7,9 +8,13 @@ namespace Models
{
public enum ComplaintSeverity
{
[Description("Low")]
LOW,
[Description("Normal")]
NORMAL,
[Description("High")]
HIGH,
[Description("Urgent")]
URGENT
}
}

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
@@ -7,9 +8,13 @@ namespace Models
{
public enum ComplaintStatus
{
[Description("Filed")]
FILED,
[Description("Under review")]
UNDER_REVIEW,
[Description("Solved")]
SOLVED,
[Description("Archived")]
ARCHIVED
}
}

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
@@ -32,6 +33,7 @@ namespace Models
{
get;set;
}
[StringLength(255)]
public string Title
{
get;set;

View File

@@ -25,7 +25,7 @@ namespace Models
{
get; set;
}
[StringLength(255)]
public string Name
{
get; set;

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
@@ -8,11 +9,11 @@ namespace Models
{
public enum UserRole
{
[Display(Name = "Tenant")]
[Description("Tenant")]
TENANT,
[Display(Name = "Manager")]
[Description("Manager")]
MANAGER,
[Display(Name = "Administrator")]
[Description("Administrator")]
ADMIN
}
}