Merge pull request 'BACKDEV-404' (#4) from BACKDEV-404 into dev

Reviewed-on: #4
This commit is contained in:
bekodeg 2024-04-24 19:10:39 +04:00
commit b48619623e
9 changed files with 106 additions and 0 deletions

View File

@ -0,0 +1,13 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class BuildBindingModel : IBindingModel
{
public int Id { get; set; }
public string BuildName { get; set; } = string.Empty;
public double Price { get; set; }
public int VendorId { get; set; }
public Dictionary<int, (IComponentModel, int)> BuildComponent { get; set; } = new();
}
}

View File

@ -0,0 +1,12 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class CommentBindingModel : ICommentModel
{
public int Id { get; set; }
public DateTime Date { get; set; } = DateTime.Now;
public string Text { get; set; } = string.Empty;
public int BuildId { get; set; }
}
}

View File

@ -0,0 +1,11 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class ComponentBindingModel : IComponentModel
{
public int Id { get; set; }
public string ComponentName { get; set; } = string.Empty;
public double Cost { get; set; }
}
}

View File

@ -0,0 +1,15 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class OrderBindingModel : IOrderModel
{
public int Id { get; set; }
public int CannedId { get; set; }
public int Count { get; set; }
public double Sum { get; set; }
public OrderStatus Status { get; set; } = OrderStatus.Неизвестен;
public DateTime DateCreate { get; set; } = DateTime.Now;
public DateTime? DateImplement { get; set; }
}
}

View File

@ -0,0 +1,12 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class ProductBindingModel : IProductModel
{
public int Id { get; set; }
public string ProductName { get; set; } = string.Empty;
public double Price { get; set; }
public Dictionary<int, (IComponentModel, int)> ProductComponents { get; set; } = new();
}
}

View File

@ -0,0 +1,15 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class PurchaseBindingModel : IPurchaseModel
{
public int Id { get; set; }
public double Cost { get; set; }
public DateTime DateCreate { get; set; }
public int VendorId { get; set; }
public double Sum { get; set; }
public Dictionary<int, (IBuildModel, int)> PurchaseBuild { get; set; } = new();
public Dictionary<int, (IProductModel, int)> PurchaseProduct { get; set; } = new();
}
}

View File

@ -0,0 +1,12 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class StoreKeeperBindingModel : IStoreKeeperModel
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,12 @@
using ComputerHardwareStoreDataModels.Models;
namespace ComputerHardwareStoreContracts.BindingModels
{
public class VendorBindingModel : IVendorModel
{
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
}
}

View File

@ -6,4 +6,8 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ComputerHardwareStoreDataModels\ComputerHardwareStoreDataModels.csproj" />
</ItemGroup>
</Project>