Proj. plan, URS v1.01; UML v1; ModelBinding, DataAnnotations, Models start

This commit is contained in:
Dimitar Byalkov
2023-03-16 00:12:14 +01:00
parent 3874cc0ad0
commit e296205466
112 changed files with 506 additions and 954 deletions

View 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();
}
}
}

View 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();
}
}
}

View 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(); }
}
}

View 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
}
}

View 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
}
}

View 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();
}
}
}

View 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; }
}
}

View 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();
}
}

View 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;
}
}
}

View 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
}
}