DataModels: Guarantor + Contractor.

BindingModels: Guarantor.
This commit is contained in:
Yuee Shiness 2023-04-05 19:02:12 +04:00
parent 9b8c383e22
commit c3f77f6bad
11 changed files with 118 additions and 1 deletions

View File

@ -0,0 +1,19 @@
using ComputerStoreDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.BindingModels
{
public class ComponentBindingModel : IComponentModel
{
public int ID { get; set; }
public string Name { get; set; } = string.Empty;
public double Price { get; set; }
}
}

View File

@ -0,0 +1,21 @@
using ComputerStoreDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.BindingModels
{
public class PCBindingModel : IPCModel
{
public int ID {get; set;}
public string Name { get; set; } = string.Empty;
public double Price { get; set; }
public Dictionary<int, (IComponentModel, int)> PCComponents { get; set; } = new();
}
}

View File

@ -0,0 +1,21 @@
using ComputerStoreDataModels.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreContracts.BindingModels
{
public class ProductBindingModel : IProductModel
{
public int ID { get; set; }
public string Name { get; set; } = string.Empty;
public double Price { get; set; }
public Dictionary<int, (IComponentModel, int)> ProductComponents { get; set; } = new();
}
}

View File

@ -6,4 +6,15 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Folder Include="BusinessLogicContracts\" />
<Folder Include="ViewModels\" />
<Folder Include="StorageContracts\" />
<Folder Include="SearchModels\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ComputerStoreDataModels\ComputerStoreDataModels.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreDataModels.Models
{
public interface IComponentModel : IID
{
string Name { get;}
double Price { get;}
}
}

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreDataModels.Models
{
public interface IPCModel : IID
{
string Name { get; }
double Price { get; }
Dictionary<int,(IComponentModel,int)> PCComponents { get; }
}
}

View File

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreDataModels.Models
{
public interface IProductModel : IID
{
string Name { get; }
double Price { get; }
Dictionary<int,(IComponentModel,int)> ProductComponents { get; }
}
}

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ComputerStoreDataModels.Model
namespace ComputerStoreDataModels.Models
{
public class IUserModel : IID
{