Создание интерфейсов сущностей

This commit is contained in:
Володя 2023-04-22 13:20:28 +03:00
parent eaed51c79f
commit aaff2b4674
11 changed files with 126 additions and 8 deletions

View File

@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.3.32825.248 VisualStudioVersion = 17.3.32825.248
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Subd", "Subd\Subd.csproj", "{4F51BFA8-D899-4A30-96AA-0B6BFE630E9C}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataModels", "Subd\DataModels.csproj", "{4F51BFA8-D899-4A30-96AA-0B6BFE630E9C}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@ -1,7 +0,0 @@
namespace Subd
{
public class Class1
{
}
}

13
Subd/Subd/IId.cs Normal file
View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataModels
{
public interface IId
{
int Id { get; }
}
}

17
Subd/Subd/Models/ICar.cs Normal file
View File

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataModels.Models
{
public interface ICar : IId
{
string Model { get; }
int Tonnage { get; }
int StatusId { get; }
string StatusTitle { get; }
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataModels.Models
{
public interface ICompany : IId
{
string Title { get; }
int StatusId { get; }
string StatusTitle { get; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataModels.Models
{
public interface IHuman : IId
{
string Name { get; }
string Phone { get; }
int StatusId { get; }
string StatusTitle { get; }
}
}

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataModels.Models
{
public interface IPlace : IId
{
string Title { get; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataModels.Models
{
public interface IRoute : IId
{
int PlaceStart { get; }
int PlaceEnd { get; }
int Length { get; }
string Title { get; }
}
}

View File

@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataModels.Models
{
public interface IStatus : IId
{
string Title {get; }
}
}

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataModels.Models
{
public interface IVoyage : IId
{
int CarId { get; }
string CarName { get; }
int HumanId { get; }
string HumanName { get; }
int CompanyId { get; }
string CompanyName { get; }
int RouteId { get; }
DateTime DateStart { get; }
DateTime DateEnd { get; }
}
}