search + view models

This commit is contained in:
Леонид Малафеев 2024-04-23 18:05:32 +04:00
parent 7f4a71113f
commit e82628c365
34 changed files with 486 additions and 0 deletions

Binary file not shown.

View File

@ -5,6 +5,8 @@ VisualStudioVersion = 17.0.31903.59
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SportCompetitionsDataModels", "SportCompetitionsDataModels\SportCompetitionsDataModels.csproj", "{D4E6FE63-77F7-428F-99B5-9062AE81C1CA}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SportCompetitionsDataModels", "SportCompetitionsDataModels\SportCompetitionsDataModels.csproj", "{D4E6FE63-77F7-428F-99B5-9062AE81C1CA}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SportCompetitionsContracts", "SportCompetitionsContracts\SportCompetitionsContracts.csproj", "{608BDB59-034B-4FDE-A888-C3155B9AA0F6}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
@ -15,8 +17,15 @@ Global
{D4E6FE63-77F7-428F-99B5-9062AE81C1CA}.Debug|Any CPU.Build.0 = Debug|Any CPU {D4E6FE63-77F7-428F-99B5-9062AE81C1CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D4E6FE63-77F7-428F-99B5-9062AE81C1CA}.Release|Any CPU.ActiveCfg = Release|Any CPU {D4E6FE63-77F7-428F-99B5-9062AE81C1CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D4E6FE63-77F7-428F-99B5-9062AE81C1CA}.Release|Any CPU.Build.0 = Release|Any CPU {D4E6FE63-77F7-428F-99B5-9062AE81C1CA}.Release|Any CPU.Build.0 = Release|Any CPU
{608BDB59-034B-4FDE-A888-C3155B9AA0F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{608BDB59-034B-4FDE-A888-C3155B9AA0F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{608BDB59-034B-4FDE-A888-C3155B9AA0F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{608BDB59-034B-4FDE-A888-C3155B9AA0F6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BAA00FC1-B1E5-422A-B86A-FD896A8E978C}
EndGlobalSection
EndGlobal EndGlobal

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.SearchModels
{
public class CompetitionSearchModel
{
public int? Id { get; set; }
public string? CompetitionName { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.SearchModels
{
public class MemberSearchModel
{
public int? Id { get; set; }
public string? MemberFCs { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.SearchModels
{
public class RecordSearchModel
{
public int? Id { get; set; }
public string? RecordName { get; set; }
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.SearchModels
{
public class ResultSearchModel
{
public int? Id { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.SearchModels
{
public class TeamSearchModel
{
public int? Id { get; set; }
public string? TeamName { get; set; }
}
}

View File

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

View File

@ -0,0 +1,21 @@
using SportCompetitionsDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.ViewModels
{
public class CompetitionViewModel : ICompetitionModel
{
public int Id { get; set; }
[DisplayName("Название соревнования")]
public string? CompetitionName { get; set; }
[DisplayName("Дата проведения")]
public DateTime CompetitionDateHolding { get; set; }
[DisplayName("Город проведения")]
public string? CompetitionCity { get; set; }
}
}

View File

@ -0,0 +1,23 @@
using SportCompetitionsDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.ViewModels
{
public class MemberViewModel : IMemberModel
{
public int Id { get; set; }
[DisplayName("ФИО Участника")]
public string? MemberFCs { get; set; }
[DisplayName("Дата рождения")]
public DateTime MemberBirthDate { get; }
[DisplayName("Пол")]
public string? MemberGender { get; set; }
[DisplayName("Команда")]
public int TeamId { get; set; }
}
}

View File

@ -0,0 +1,26 @@
using SportCompetitionsDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.ViewModels
{
public class RecordViewModel : IRecordModel
{
public int Id { get; set; }
[DisplayName("Название рекорда")]
public string? RecordName { get; set; }
[DisplayName("Описание")]
public string? RecordDecriptiption { get; set; }
[DisplayName("Участник")]
public int MemberId { get; set; }
[DisplayName("Дата установления")]
public DateTime RecordDate { get; set; }
[DisplayName("Значение")]
public int RecordValue { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using SportCompetitionsDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.ViewModels
{
public class ResultViewModel : IResultModel
{
public int Id { get; set; }
[DisplayName("Соревнование")]
public int CompetitionId { get; set; }
[DisplayName("Команда")]
public int TeamId { get; set; }
[DisplayName("Место")]
public int ResultPosition { get; set; }
}
}

View File

@ -0,0 +1,19 @@
using SportCompetitionsDataModels.Models;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SportCompetitionsContracts.ViewModels
{
public class TeamViewModel : ITeamModel
{
public int Id { get; set; }
[DisplayName("Название команды")]
public string? TeamName { get; }
[DisplayName("Страна команды")]
public string? TeamCountry { get; }
}
}

View File

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v7.0", FrameworkDisplayName = ".NET 7.0")]

View File

@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия:4.0.30319.42000
//
// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае
// повторной генерации кода.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("SportCompetitionsContracts")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("SportCompetitionsContracts")]
[assembly: System.Reflection.AssemblyTitleAttribute("SportCompetitionsContracts")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// Создано классом WriteCodeFragment MSBuild.

View File

@ -0,0 +1 @@
fbc92a170b005ab2509e89cb1af8a5876214f936

View File

@ -0,0 +1,11 @@
is_global = true
build_property.TargetFramework = net7.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = SportCompetitionsContracts
build_property.ProjectDir = F:\SUBD\lab4\SportCompetitions\SportCompetitionsContracts\

View File

@ -0,0 +1,8 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;

View File

@ -0,0 +1,122 @@
{
"format": 1,
"restore": {
"F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsContracts\\SportCompetitionsContracts.csproj": {}
},
"projects": {
"F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsContracts\\SportCompetitionsContracts.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsContracts\\SportCompetitionsContracts.csproj",
"projectName": "SportCompetitionsContracts",
"projectPath": "F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsContracts\\SportCompetitionsContracts.csproj",
"packagesPath": "C:\\Users\\Леонид\\.nuget\\packages\\",
"outputPath": "F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsContracts\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\Леонид\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net7.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"projectReferences": {
"F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsDataModels\\SportCompetitionsDataModels.csproj": {
"projectPath": "F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsDataModels\\SportCompetitionsDataModels.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.400\\RuntimeIdentifierGraph.json"
}
}
},
"F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsDataModels\\SportCompetitionsDataModels.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsDataModels\\SportCompetitionsDataModels.csproj",
"projectName": "SportCompetitionsDataModels",
"projectPath": "F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsDataModels\\SportCompetitionsDataModels.csproj",
"packagesPath": "C:\\Users\\Леонид\\.nuget\\packages\\",
"outputPath": "F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsDataModels\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\Леонид\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net7.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.400\\RuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Леонид\.nuget\packages\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.7.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\Леонид\.nuget\packages\" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

View File

@ -0,0 +1,91 @@
{
"version": 3,
"targets": {
"net7.0": {
"SportCompetitionsDataModels/1.0.0": {
"type": "project",
"framework": ".NETCoreApp,Version=v7.0",
"compile": {
"bin/placeholder/SportCompetitionsDataModels.dll": {}
},
"runtime": {
"bin/placeholder/SportCompetitionsDataModels.dll": {}
}
}
}
},
"libraries": {
"SportCompetitionsDataModels/1.0.0": {
"type": "project",
"path": "../SportCompetitionsDataModels/SportCompetitionsDataModels.csproj",
"msbuildProject": "../SportCompetitionsDataModels/SportCompetitionsDataModels.csproj"
}
},
"projectFileDependencyGroups": {
"net7.0": [
"SportCompetitionsDataModels >= 1.0.0"
]
},
"packageFolders": {
"C:\\Users\\Леонид\\.nuget\\packages\\": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsContracts\\SportCompetitionsContracts.csproj",
"projectName": "SportCompetitionsContracts",
"projectPath": "F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsContracts\\SportCompetitionsContracts.csproj",
"packagesPath": "C:\\Users\\Леонид\\.nuget\\packages\\",
"outputPath": "F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsContracts\\obj\\",
"projectStyle": "PackageReference",
"configFilePaths": [
"C:\\Users\\Леонид\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net7.0"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"projectReferences": {
"F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsDataModels\\SportCompetitionsDataModels.csproj": {
"projectPath": "F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsDataModels\\SportCompetitionsDataModels.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.400\\RuntimeIdentifierGraph.json"
}
}
}
}

View File

@ -0,0 +1,8 @@
{
"version": 2,
"dgSpecHash": "5EhweaXzQ7PvtlnsR9egwQOGOnH2M1FS1fBEHfzjGtrctM8mPuGxXV6THNqgEdTBTmcax2RYTU035XsojAJzdw==",
"success": true,
"projectFilePath": "F:\\SUBD\\lab4\\SportCompetitions\\SportCompetitionsContracts\\SportCompetitionsContracts.csproj",
"expectedPackageFiles": [],
"logs": []
}