Proj. plan, URS v1.01; UML v1; ModelBinding, DataAnnotations, Models start
This commit is contained in:
49
StudentHouseDashboard/HouseData/Models/Announcement.cs
Normal file
49
StudentHouseDashboard/HouseData/Models/Announcement.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace StudentHouseDashboard.Models
|
||||
{
|
||||
public class Announcement : IMessage, IVotable
|
||||
{
|
||||
public List<Comment> Comments
|
||||
{
|
||||
get => default;
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public int IsImportant
|
||||
{
|
||||
get => default;
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public int IsSticky
|
||||
{
|
||||
get => default;
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public string Title { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public string Description { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public User Author { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public DateTime PublishDate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
public void DownVote()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void UpVote()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
32
StudentHouseDashboard/HouseData/Models/Comment.cs
Normal file
32
StudentHouseDashboard/HouseData/Models/Comment.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace StudentHouseDashboard.Models
|
||||
{
|
||||
public class Comment : IMessage, IVotable
|
||||
{
|
||||
public int Responses
|
||||
{
|
||||
get => default;
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
public string Title { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public string Description { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public User Author { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public DateTime PublishDate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
public void DownVote()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void UpVote()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
31
StudentHouseDashboard/HouseData/Models/Complaint.cs
Normal file
31
StudentHouseDashboard/HouseData/Models/Complaint.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace StudentHouseDashboard.Models
|
||||
{
|
||||
public class Complaint : IMessage
|
||||
{
|
||||
public ComplaintStatus Status
|
||||
{
|
||||
get => default;
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public ComplaintSeverity Severity
|
||||
{
|
||||
get => default;
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public string Title { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public string Description { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public User Author { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public DateTime PublishDate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
}
|
||||
}
|
15
StudentHouseDashboard/HouseData/Models/ComplaintSeverity.cs
Normal file
15
StudentHouseDashboard/HouseData/Models/ComplaintSeverity.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace StudentHouseDashboard.Models
|
||||
{
|
||||
public enum ComplaintSeverity
|
||||
{
|
||||
LOW,
|
||||
NORMAL,
|
||||
HIGH,
|
||||
URGENT
|
||||
}
|
||||
}
|
15
StudentHouseDashboard/HouseData/Models/ComplaintStatus.cs
Normal file
15
StudentHouseDashboard/HouseData/Models/ComplaintStatus.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace StudentHouseDashboard.Models
|
||||
{
|
||||
public enum ComplaintStatus
|
||||
{
|
||||
FILED,
|
||||
UNDER_REVIEW,
|
||||
SOLVED,
|
||||
ARCHIVED
|
||||
}
|
||||
}
|
41
StudentHouseDashboard/HouseData/Models/Event.cs
Normal file
41
StudentHouseDashboard/HouseData/Models/Event.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace StudentHouseDashboard.Models
|
||||
{
|
||||
public class Event : IMessage, IVotable
|
||||
{
|
||||
public int StartDate
|
||||
{
|
||||
get => default;
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public int EndDate
|
||||
{
|
||||
get => default;
|
||||
set
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public string Title { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public string Description { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public User Author { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
public DateTime PublishDate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
|
||||
|
||||
public void DownVote()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void UpVote()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
15
StudentHouseDashboard/HouseData/Models/IMessage.cs
Normal file
15
StudentHouseDashboard/HouseData/Models/IMessage.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace StudentHouseDashboard.Models
|
||||
{
|
||||
public interface IMessage
|
||||
{
|
||||
string Title { get; set; }
|
||||
string Description { get; set; }
|
||||
User Author { get; set; }
|
||||
DateTime PublishDate { get; set; }
|
||||
}
|
||||
}
|
13
StudentHouseDashboard/HouseData/Models/IVotable.cs
Normal file
13
StudentHouseDashboard/HouseData/Models/IVotable.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace StudentHouseDashboard.Models
|
||||
{
|
||||
public interface IVotable
|
||||
{
|
||||
void UpVote();
|
||||
void DownVote();
|
||||
}
|
||||
}
|
26
StudentHouseDashboard/HouseData/Models/User.cs
Normal file
26
StudentHouseDashboard/HouseData/Models/User.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace StudentHouseDashboard.Models
|
||||
{
|
||||
public class User
|
||||
{
|
||||
public User(int username, UserRole role)
|
||||
{
|
||||
Username = username;
|
||||
Role = role;
|
||||
}
|
||||
|
||||
public int Username
|
||||
{
|
||||
get;set;
|
||||
}
|
||||
|
||||
public UserRole Role
|
||||
{
|
||||
get;set;
|
||||
}
|
||||
}
|
||||
}
|
14
StudentHouseDashboard/HouseData/Models/UserRole.cs
Normal file
14
StudentHouseDashboard/HouseData/Models/UserRole.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace StudentHouseDashboard.Models
|
||||
{
|
||||
public enum UserRole
|
||||
{
|
||||
TENANT,
|
||||
MANAGER,
|
||||
ADMIN
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user