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,78 @@
<?xml version="1.0" encoding="utf-8"?>
<ClassDiagram MajorVersion="1" MinorVersion="1">
<Class Name="StudentHouseDashboard.Models.Announcement" BaseTypeListCollapsed="true">
<Position X="4.75" Y="2" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAACAAAAAEgAEAAiAAAAAAAAAAAAAAAAAAAAAAAIhA=</HashCode>
<FileName>Models\Announcement.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
</Class>
<Class Name="StudentHouseDashboard.Models.Comment" BaseTypeListCollapsed="true">
<Position X="6.5" Y="2" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAFgAEAAiAAAAAAAAAAAAAAAAAAAAAAAABA=</HashCode>
<FileName>Models\Comment.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
</Class>
<Class Name="StudentHouseDashboard.Models.Complaint" BaseTypeListCollapsed="true">
<Position X="8.25" Y="2" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAEAAAgAEAAiAAAAAAAAAAAAAAAAAAAAAQAAAA=</HashCode>
<FileName>Models\Complaint.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
</Class>
<Class Name="StudentHouseDashboard.Models.Event" BaseTypeListCollapsed="true">
<Position X="10" Y="2" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAEgAEAAiAAAAAAgAAAAAAAAAAAAAEAAABA=</HashCode>
<FileName>Models\Event.cs</FileName>
</TypeIdentifier>
<Lollipop Position="0.2" Collapsed="true" />
</Class>
<Class Name="StudentHouseDashboard.Models.User">
<Position X="11.75" Y="2" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAAAAAAEQAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Models\User.cs</FileName>
</TypeIdentifier>
</Class>
<Interface Name="StudentHouseDashboard.Models.IMessage">
<Position X="11.75" Y="5.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAAgAEAAiAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Models\IMessage.cs</FileName>
</TypeIdentifier>
</Interface>
<Interface Name="StudentHouseDashboard.Models.IVotable">
<Position X="10" Y="5.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABA=</HashCode>
<FileName>Models\IVotable.cs</FileName>
</TypeIdentifier>
</Interface>
<Enum Name="StudentHouseDashboard.Models.ComplaintSeverity">
<Position X="4.75" Y="5.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAEgAAAACgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</HashCode>
<FileName>Models\ComplaintSeverity.cs</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="StudentHouseDashboard.Models.ComplaintStatus">
<Position X="6.5" Y="5.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AAAAAAAABAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAA=</HashCode>
<FileName>Models\ComplaintStatus.cs</FileName>
</TypeIdentifier>
</Enum>
<Enum Name="StudentHouseDashboard.Models.UserRole">
<Position X="8.25" Y="5.25" Width="1.5" />
<TypeIdentifier>
<HashCode>AAQAAAAAAAAAAAAAAAAAAAAAQAAAAQAAAAAAAAAAAAA=</HashCode>
<FileName>Models\UserRole.cs</FileName>
</TypeIdentifier>
</Enum>
<Font Name="Segoe UI" Size="9" />
</ClassDiagram>

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

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Folder Include="Controllers\" />
</ItemGroup>
</Project>