add models and contracts

This commit is contained in:
MaxKarme 2023-04-02 16:39:43 +04:00
parent 963ba81472
commit 3ca8f0c7d2
41 changed files with 407 additions and 1 deletions

View File

@ -3,7 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32319.34
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "University", "University\University.csproj", "{34B9CDDB-BFE5-48B9-AA3A-1A01D99A765D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "University", "University\University.csproj", "{34B9CDDB-BFE5-48B9-AA3A-1A01D99A765D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversityDataModels", "UniversityDataModels\UniversityDataModels.csproj", "{36B2DE4B-7689-4287-911E-892FCD27AE84}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniversityContracts", "UniversityContracts\UniversityContracts.csproj", "{BACEFD46-1073-4730-BC42-15B0D0D359C9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -15,6 +19,14 @@ Global
{34B9CDDB-BFE5-48B9-AA3A-1A01D99A765D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{34B9CDDB-BFE5-48B9-AA3A-1A01D99A765D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{34B9CDDB-BFE5-48B9-AA3A-1A01D99A765D}.Release|Any CPU.Build.0 = Release|Any CPU
{36B2DE4B-7689-4287-911E-892FCD27AE84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36B2DE4B-7689-4287-911E-892FCD27AE84}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36B2DE4B-7689-4287-911E-892FCD27AE84}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36B2DE4B-7689-4287-911E-892FCD27AE84}.Release|Any CPU.Build.0 = Release|Any CPU
{BACEFD46-1073-4730-BC42-15B0D0D359C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BACEFD46-1073-4730-BC42-15B0D0D359C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BACEFD46-1073-4730-BC42-15B0D0D359C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BACEFD46-1073-4730-BC42-15B0D0D359C9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -0,0 +1,11 @@
using UniversityDataModels.Models;
namespace UniversityContracts.BindingModels
{
public class ActivityBindingModel : IActivityModel
{
public int Id { get; }
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int Number { get; }
}
}

View File

@ -0,0 +1,11 @@
using UniversityDataModels.Models;
namespace UniversityContracts.BindingModels
{
public class DisciplineBindingModel : IDisciplineModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
public string Department { get; } = String.Empty;
}
}

View File

@ -0,0 +1,13 @@
using UniversityDataModels.Enums;
using UniversityDataModels.Models;
namespace UniversityContracts.BindingModels
{
public class ExaminationResultBindingModel : IExaminationResultModel
{
public int Id { get; }
public string ExaminationForm { get; } = String.Empty;
public MarkType Mark { get; } = MarkType.Неизвестен;
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
}
}

View File

@ -0,0 +1,10 @@
using UniversityDataModels.Models;
namespace UniversityContracts.BindingModels
{
public class ReportTypeBindingModel : IReportTypeModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
}
}

View File

@ -0,0 +1,11 @@
using UniversityDataModels.Models;
namespace UniversityContracts.BindingModels
{
public class StatementBindingModel : IStatementModel
{
public int Id { get; }
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int HoursCount { get; }
}
}

View File

@ -0,0 +1,11 @@
using UniversityDataModels.Models;
namespace UniversityContracts.BindingModels
{
public class StudentBindingModel : IStudentModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
public string RecordCardNumber { get; } = String.Empty;
}
}

View File

@ -0,0 +1,8 @@
using UniversityDataModels.Models;
namespace UniversityContracts.BuisnessLogicContracts
{
public interface IActivityLogic
{
}
}

View File

@ -0,0 +1,9 @@
using UniversityDataModels.Models;
namespace UniversityContracts.BuisnessLogicContracts
{
public interface IDisciplineLogic
{
}
}

View File

@ -0,0 +1,8 @@
using UniversityDataModels.Models;
namespace UniversityContracts.BuisnessLogicContracts
{
public interface IExaminationResultLogic
{
}
}

View File

@ -0,0 +1,9 @@
using UniversityDataModels.Models;
namespace UniversityContracts.BuisnessLogicContracts
{
public interface IReportTypeLogic
{
}
}

View File

@ -0,0 +1,8 @@
using UniversityDataModels.Models;
namespace UniversityContracts.BuisnessLogicContracts
{
public interface IStatementLogic
{
}
}

View File

@ -0,0 +1,8 @@
using UniversityDataModels.Models;
namespace UniversityContracts.BuisnessLogicContracts
{
public interface IStudentLogic
{
}
}

View File

@ -0,0 +1,11 @@
using UniversityDataModels.Models;
namespace UniversityContracts.SearchModels
{
public class ActivitySearchModel : IActivityModel
{
public int Id { get; }
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int Number { get; }
}
}

View File

@ -0,0 +1,11 @@
using UniversityDataModels.Models;
namespace UniversityContracts.SearchModels
{
public class DisciplineSearchModel : IDisciplineModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
public string Department { get; } = String.Empty;
}
}

View File

@ -0,0 +1,13 @@
using UniversityDataModels.Enums;
using UniversityDataModels.Models;
namespace UniversityContracts.SearchModels
{
public class ExaminationResultSearchModel : IExaminationResultModel
{
public int Id { get; }
public string ExaminationForm { get; } = String.Empty;
public MarkType Mark { get; } = MarkType.Неизвестен;
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
}
}

View File

@ -0,0 +1,10 @@
using UniversityDataModels.Models;
namespace UniversityContracts.SearchModels
{
public class ReportTypeSearchModel : IReportTypeModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
}
}

View File

@ -0,0 +1,11 @@
using UniversityDataModels.Models;
namespace UniversityContracts.SearchModels
{
public class StatementSearchModel : IStatementModel
{
public int Id { get; }
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int HoursCount { get; }
}
}

View File

@ -0,0 +1,11 @@
using UniversityDataModels.Models;
namespace UniversityContracts.SearchModels
{
public class StudentSearchModel : IStudentModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
public string RecordCardNumber { get; } = String.Empty;
}
}

View File

@ -0,0 +1,8 @@
using UniversityDataModels.Models;
namespace UniversityContracts.StoragesContracts
{
public interface IActivityStorage
{
}
}

View File

@ -0,0 +1,8 @@
using UniversityDataModels.Models;
namespace UniversityContracts.StoragesContracts
{
public interface IDisciplineStorage
{
}
}

View File

@ -0,0 +1,8 @@
using UniversityDataModels.Models;
namespace UniversityContracts.StoragesContracts
{
public interface IExaminationResultStorage
{
}
}

View File

@ -0,0 +1,8 @@
using UniversityDataModels.Models;
namespace UniversityContracts.StoragesContracts
{
public interface IReportTypeStorage
{
}
}

View File

@ -0,0 +1,8 @@
using UniversityDataModels.Models;
namespace UniversityContracts.StoragesContracts
{
public interface IStatementStorage
{
}
}

View File

@ -0,0 +1,8 @@
using UniversityDataModels.Models;
namespace UniversityContracts.StoragesContracts
{
public interface IStudentStorage
{
}
}

View File

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

View File

@ -0,0 +1,11 @@
using UniversityDataModels.Models;
namespace UniversityContracts.ViewModels
{
public class ActivityViewModel : IActivityModel
{
public int Id { get; }
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int Number { get; }
}
}

View File

@ -0,0 +1,11 @@
using UniversityDataModels.Models;
namespace UniversityContracts.ViewModels
{
public class DisciplineViewModel : IDisciplineModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
public string Department { get; } = String.Empty;
}
}

View File

@ -0,0 +1,13 @@
using UniversityDataModels.Enums;
using UniversityDataModels.Models;
namespace UniversityContracts.ViewModels
{
public class ExaminationResultSearchModel : IExaminationResultModel
{
public int Id { get; }
public string ExaminationForm { get; } = String.Empty;
public MarkType Mark { get; } = MarkType.Неизвестен;
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
}
}

View File

@ -0,0 +1,10 @@
using UniversityDataModels.Models;
namespace UniversityContracts.ViewModels
{
public class ReportTypeViewModel : IReportTypeModel
{
public int Id { get; }
public string Name { get; } = String.Empty;
}
}

View File

@ -0,0 +1,11 @@
using UniversityDataModels.Models;
namespace UniversityContracts.ViewModels
{
public class StatementViewModel : IStatementModel
{
public int Id { get; }
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int HoursCount { get; }
}
}

View File

@ -0,0 +1,11 @@
using UniversityDataModels.Models;
namespace UniversityContracts.ViewModels
{
public class StudentViewModel : IStatementModel
{
public int Id { get; }
public DateTime Date { get; } = DateTime.SpecifyKind(DateTime.Now, DateTimeKind.Utc);
public int HoursCount { get; }
}
}

View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace UniversityDataModels.Enums
{
public enum MarkType
{
Неизвестен = -1,
Плохо = 2,
Удовлетворительно = 3,
Хорошо = 4,
Отлично = 5
}
}

View File

@ -0,0 +1,7 @@
namespace UniversityDataModels
{
public interface IId
{
int Id { get; }
}
}

View File

@ -0,0 +1,8 @@
namespace UniversityDataModels.Models
{
public interface IActivityModel : IId
{
DateTime Date { get; }
int Number { get; }
}
}

View File

@ -0,0 +1,8 @@
namespace UniversityDataModels.Models
{
public interface IDisciplineModel : IId
{
String Name { get; }
String Department { get; }
}
}

View File

@ -0,0 +1,10 @@
using UniversityDataModels.Enums;
namespace UniversityDataModels.Models
{
public interface IExaminationResultModel : IId
{
String ExaminationForm { get; }
MarkType Mark { get; }
DateTime Date { get; }
}
}

View File

@ -0,0 +1,7 @@
namespace UniversityDataModels.Models
{
public interface IReportTypeModel : IId
{
string Name { get; }
}
}

View File

@ -0,0 +1,8 @@
namespace UniversityDataModels.Models
{
public interface IStatementModel : IId
{
DateTime Date { get; }
int HoursCount { get; }
}
}

View File

@ -0,0 +1,8 @@
namespace UniversityDataModels.Models
{
public interface IStudentModel : IId
{
String Name { get; }
String RecordCardNumber { get; }
}
}

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>