From d48b7ac0dee23df7a6c7d6b87b92ff4fbcb3bacf Mon Sep 17 00:00:00 2001 From: dex_moth Date: Thu, 18 Apr 2024 16:47:15 +0400 Subject: [PATCH] bindingmodels --- .../BindingModels/BuildBindingModel.cs | 13 +++++++++++++ .../BindingModels/CommentBindingModel.cs | 12 ++++++++++++ .../BindingModels/ComponentBindingModel.cs | 11 +++++++++++ .../BindingModels/OrderBindingModel.cs | 15 +++++++++++++++ .../BindingModels/ProductBindingModel.cs | 12 ++++++++++++ .../BindingModels/PurchaseBindingModel.cs | 15 +++++++++++++++ .../BindingModels/StoreKeeperBindingModel.cs | 12 ++++++++++++ .../BindingModels/VendorBindingModel.cs | 12 ++++++++++++ .../ComputerHardwareStoreContracts.csproj | 4 ++++ 9 files changed, 106 insertions(+) create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/BuildBindingModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/CommentBindingModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ComponentBindingModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/OrderBindingModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ProductBindingModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/PurchaseBindingModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/StoreKeeperBindingModel.cs create mode 100644 ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/VendorBindingModel.cs diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/BuildBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/BuildBindingModel.cs new file mode 100644 index 0000000..a90636c --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/BuildBindingModel.cs @@ -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 BuildComponent { get; set; } = new(); + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/CommentBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/CommentBindingModel.cs new file mode 100644 index 0000000..ac5cf8d --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/CommentBindingModel.cs @@ -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; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ComponentBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ComponentBindingModel.cs new file mode 100644 index 0000000..ecc9bc5 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ComponentBindingModel.cs @@ -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; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/OrderBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/OrderBindingModel.cs new file mode 100644 index 0000000..fb0a72d --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/OrderBindingModel.cs @@ -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; } + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ProductBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ProductBindingModel.cs new file mode 100644 index 0000000..78b8a2e --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/ProductBindingModel.cs @@ -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 ProductComponents { get; set; } = new(); + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/PurchaseBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/PurchaseBindingModel.cs new file mode 100644 index 0000000..1e27ca0 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/PurchaseBindingModel.cs @@ -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 PurchaseBuild { get; set; } = new(); + public Dictionary PurchaseProduct { get; set; } = new(); + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/StoreKeeperBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/StoreKeeperBindingModel.cs new file mode 100644 index 0000000..144ade0 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/StoreKeeperBindingModel.cs @@ -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; + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/VendorBindingModel.cs b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/VendorBindingModel.cs new file mode 100644 index 0000000..9f4dc29 --- /dev/null +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/BindingModels/VendorBindingModel.cs @@ -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; + } +} diff --git a/ComputerHardwareStore/ComputerHardwareStoreContracts/ComputerHardwareStoreContracts.csproj b/ComputerHardwareStore/ComputerHardwareStoreContracts/ComputerHardwareStoreContracts.csproj index fa71b7a..4e4937a 100644 --- a/ComputerHardwareStore/ComputerHardwareStoreContracts/ComputerHardwareStoreContracts.csproj +++ b/ComputerHardwareStore/ComputerHardwareStoreContracts/ComputerHardwareStoreContracts.csproj @@ -6,4 +6,8 @@ enable + + + +