view announcements, users by page number
This commit is contained in:
@@ -7,7 +7,7 @@ namespace StudentHouseDashboard.Models
|
||||
{
|
||||
public class Announcement : GenericMessage, IVotable
|
||||
{
|
||||
public Announcement(User author, string description, string title, DateTime publishDate, bool isImportant, bool isSticky) : base(author, description, title, publishDate)
|
||||
public Announcement(int id, User author, string description, string title, DateTime publishDate, bool isImportant, bool isSticky) : base(id, author, description, title, publishDate)
|
||||
{
|
||||
IsImportant = isImportant;
|
||||
IsSticky = isSticky;
|
||||
|
@@ -7,7 +7,7 @@ namespace StudentHouseDashboard.Models
|
||||
{
|
||||
public class Comment : GenericMessage, IVotable
|
||||
{
|
||||
public Comment(User author, string description, string title, DateTime publishDate) : base(author, description, title, publishDate)
|
||||
public Comment(int id, User author, string description, string title, DateTime publishDate) : base(id, author, description, title, publishDate)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -7,7 +7,7 @@ namespace StudentHouseDashboard.Models
|
||||
{
|
||||
public class Complaint : GenericMessage
|
||||
{
|
||||
public Complaint(User author, string description, string title, DateTime publishDate, ComplaintStatus status, ComplaintSeverity severity) : base(author, description, title, publishDate)
|
||||
public Complaint(int id, User author, string description, string title, DateTime publishDate, ComplaintStatus status, ComplaintSeverity severity) : base(id, author, description, title, publishDate)
|
||||
{
|
||||
Status = status;
|
||||
Severity = severity;
|
||||
|
@@ -7,7 +7,7 @@ namespace StudentHouseDashboard.Models
|
||||
{
|
||||
public class Event : GenericMessage
|
||||
{
|
||||
public Event(User author, string description, string title, DateTime publishDate, DateTime startDate, DateTime endDate) : base(author, description, title, publishDate)
|
||||
public Event(int id, User author, string description, string title, DateTime publishDate, DateTime startDate, DateTime endDate) : base(id, author, description, title, publishDate)
|
||||
{
|
||||
StartDate = startDate;
|
||||
EndDate = endDate;
|
||||
|
@@ -13,14 +13,20 @@ namespace StudentHouseDashboard
|
||||
private string title;
|
||||
private DateTime publishDate;
|
||||
|
||||
protected GenericMessage(User author, string description, string title, DateTime publishDate)
|
||||
protected GenericMessage(int id, User author, string description, string title, DateTime publishDate)
|
||||
{
|
||||
ID = id;
|
||||
Author = author;
|
||||
Description = description;
|
||||
Title = title;
|
||||
PublishDate = publishDate;
|
||||
}
|
||||
|
||||
public int ID
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public User Author
|
||||
{
|
||||
get => author;
|
||||
|
@@ -15,7 +15,7 @@ namespace StudentHouseDashboard.Models
|
||||
|
||||
public User(int id, string name, string password, UserRole role)
|
||||
{
|
||||
Id = id;
|
||||
ID = id;
|
||||
Name = name;
|
||||
Password = password;
|
||||
Role = role;
|
||||
@@ -24,7 +24,7 @@ namespace StudentHouseDashboard.Models
|
||||
{
|
||||
|
||||
}
|
||||
public int Id
|
||||
public int ID
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
Reference in New Issue
Block a user