add models and contracts
This commit is contained in:
parent
963ba81472
commit
3ca8f0c7d2
@ -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
|
||||
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.BindingModels
|
||||
{
|
||||
public class ReportTypeBindingModel : IReportTypeModel
|
||||
{
|
||||
public int Id { get; }
|
||||
public string Name { get; } = String.Empty;
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.BuisnessLogicContracts
|
||||
{
|
||||
public interface IActivityLogic
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.BuisnessLogicContracts
|
||||
{
|
||||
|
||||
public interface IDisciplineLogic
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.BuisnessLogicContracts
|
||||
{
|
||||
public interface IExaminationResultLogic
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.BuisnessLogicContracts
|
||||
{
|
||||
|
||||
public interface IReportTypeLogic
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.BuisnessLogicContracts
|
||||
{
|
||||
public interface IStatementLogic
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.BuisnessLogicContracts
|
||||
{
|
||||
public interface IStudentLogic
|
||||
{
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.SearchModels
|
||||
{
|
||||
public class ReportTypeSearchModel : IReportTypeModel
|
||||
{
|
||||
public int Id { get; }
|
||||
public string Name { get; } = String.Empty;
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.StoragesContracts
|
||||
{
|
||||
public interface IActivityStorage
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.StoragesContracts
|
||||
{
|
||||
public interface IDisciplineStorage
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.StoragesContracts
|
||||
{
|
||||
public interface IExaminationResultStorage
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.StoragesContracts
|
||||
{
|
||||
public interface IReportTypeStorage
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.StoragesContracts
|
||||
{
|
||||
public interface IStatementStorage
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.StoragesContracts
|
||||
{
|
||||
public interface IStudentStorage
|
||||
{
|
||||
}
|
||||
}
|
13
University/UniversityContracts/UniversityContracts.csproj
Normal file
13
University/UniversityContracts/UniversityContracts.csproj
Normal 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>
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
using UniversityDataModels.Models;
|
||||
|
||||
namespace UniversityContracts.ViewModels
|
||||
{
|
||||
public class ReportTypeViewModel : IReportTypeModel
|
||||
{
|
||||
public int Id { get; }
|
||||
public string Name { get; } = String.Empty;
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
@ -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; }
|
||||
}
|
||||
}
|
17
University/UniversityDataModels/Enums/MarkType.cs
Normal file
17
University/UniversityDataModels/Enums/MarkType.cs
Normal 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
|
||||
}
|
||||
}
|
7
University/UniversityDataModels/IId.cs
Normal file
7
University/UniversityDataModels/IId.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace UniversityDataModels
|
||||
{
|
||||
public interface IId
|
||||
{
|
||||
int Id { get; }
|
||||
}
|
||||
}
|
8
University/UniversityDataModels/Models/IActivityModel.cs
Normal file
8
University/UniversityDataModels/Models/IActivityModel.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace UniversityDataModels.Models
|
||||
{
|
||||
public interface IActivityModel : IId
|
||||
{
|
||||
DateTime Date { get; }
|
||||
int Number { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
namespace UniversityDataModels.Models
|
||||
{
|
||||
public interface IDisciplineModel : IId
|
||||
{
|
||||
String Name { get; }
|
||||
String Department { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
using UniversityDataModels.Enums;
|
||||
namespace UniversityDataModels.Models
|
||||
{
|
||||
public interface IExaminationResultModel : IId
|
||||
{
|
||||
String ExaminationForm { get; }
|
||||
MarkType Mark { get; }
|
||||
DateTime Date { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
namespace UniversityDataModels.Models
|
||||
{
|
||||
public interface IReportTypeModel : IId
|
||||
{
|
||||
string Name { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
namespace UniversityDataModels.Models
|
||||
{
|
||||
public interface IStatementModel : IId
|
||||
{
|
||||
DateTime Date { get; }
|
||||
int HoursCount { get; }
|
||||
}
|
||||
}
|
8
University/UniversityDataModels/Models/IStudentModel.cs
Normal file
8
University/UniversityDataModels/Models/IStudentModel.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace UniversityDataModels.Models
|
||||
{
|
||||
public interface IStudentModel : IId
|
||||
{
|
||||
String Name { get; }
|
||||
String RecordCardNumber { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user