Documentation & code cleanup

This commit is contained in:
Dimitar Byalkov
2023-06-09 11:51:42 +02:00
parent 0ac97bd31a
commit 1832e111e3
61 changed files with 140 additions and 325 deletions

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Models
namespace Models
{
public class Announcement : GenericMessage
{
@@ -15,16 +10,16 @@ namespace Models
public Announcement()
{
}
public List<Comment> Comments
{
get;set;
get; set;
}
public bool IsImportant
{
get;set;
get; set;
}
public bool IsSticky

View File

@@ -1,21 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Models
namespace Models
{
public class Comment : GenericMessage
{
public Comment()
{
}
public Comment(int id, User author, string description, string title, DateTime publishDate) : base(id, author, description, title, publishDate)
{
Responses = new List<Comment>();
}
public List<Comment> Responses { get; set; }
public override string ToString()
{

View File

@@ -1,15 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Models
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)
{
@@ -19,17 +14,17 @@ namespace Models
public ComplaintStatus Status
{
get;set;
get; set;
}
public ComplaintSeverity Severity
{
get;set;
get; set;
}
public List<Comment> Responses
{
get;set;
get; set;
}
public override string ToString()
{

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.ComponentModel;
namespace Models
{

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.ComponentModel;
namespace Models
{

View File

@@ -1,15 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Models
namespace Models
{
public class Event : GenericMessage
{
public Event()
{
}
public Event(int id, User author, string description, string title, DateTime publishDate, DateTime startDate, DateTime endDate) : base(id, author, description, title, publishDate)
{
@@ -19,12 +14,12 @@ namespace Models
public DateTime StartDate
{
get;set;
get; set;
}
public DateTime EndDate
{
get;set;
get; set;
}
public override string ToString()
{

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Models
{
@@ -18,7 +14,7 @@ namespace Models
}
protected GenericMessage()
{
}
public int ID
{
@@ -27,16 +23,16 @@ namespace Models
public User Author
{
get;set;
get; set;
}
public string Description
{
get;set;
get; set;
}
[StringLength(255)]
public string Title
{
get;set;
get; set;
}
public DateTime PublishDate
{

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Models
{
@@ -25,13 +20,17 @@ namespace Models
{
get; set;
}
[Required]
[StringLength(255)]
public string Name
{
get; set;
}
[Required]
[DataType(DataType.Password)]
[StringLength(int.MaxValue, MinimumLength = 4)]
public string Password
{
get; set;

View File

@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.ComponentModel;
namespace Models
{