From 3cc96c4ebfb3e1b2bc81e24730f7e712b8d2604b Mon Sep 17 00:00:00 2001 From: ikuzenkuna Date: Thu, 9 Oct 2025 16:25:04 +0200 Subject: [PATCH 01/18] Creating user Dto --- PyroFetes/DTO/User/Request/CreateUserDto.cs | 10 ++++++++++ PyroFetes/DTO/User/Request/UpdateUserDto.cs | 10 ++++++++++ PyroFetes/DTO/User/Response/GetUserDto.cs | 11 +++++++++++ 3 files changed, 31 insertions(+) create mode 100644 PyroFetes/DTO/User/Request/CreateUserDto.cs create mode 100644 PyroFetes/DTO/User/Request/UpdateUserDto.cs create mode 100644 PyroFetes/DTO/User/Response/GetUserDto.cs diff --git a/PyroFetes/DTO/User/Request/CreateUserDto.cs b/PyroFetes/DTO/User/Request/CreateUserDto.cs new file mode 100644 index 0000000..5c04e00 --- /dev/null +++ b/PyroFetes/DTO/User/Request/CreateUserDto.cs @@ -0,0 +1,10 @@ +namespace PyroFetes.DTO.User.Request; + +public class CreateUserDto +{ + public string? Name { get; set; } + public string? Password { get; set; } + public string? Salt { get; set; } + public string? Fonction { get; set; } + public string? Email { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/User/Request/UpdateUserDto.cs b/PyroFetes/DTO/User/Request/UpdateUserDto.cs new file mode 100644 index 0000000..b73643d --- /dev/null +++ b/PyroFetes/DTO/User/Request/UpdateUserDto.cs @@ -0,0 +1,10 @@ +namespace PyroFetes.DTO.User.Request; + +public class UpdateUserDto +{ + public int Id { get; set; } + public string? Name { get; set; } + public string? Password { get; set; } + public string? Fonction { get; set; } + public string? Email { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/User/Response/GetUserDto.cs b/PyroFetes/DTO/User/Response/GetUserDto.cs new file mode 100644 index 0000000..1bbf572 --- /dev/null +++ b/PyroFetes/DTO/User/Response/GetUserDto.cs @@ -0,0 +1,11 @@ +namespace PyroFetes.DTO.User.Response; + +public class GetUserDto +{ + public int Id { get; set; } + public string? Name { get; set; } + public string? Password { get; set; } + public string? Salt { get; set; } + public string? Fonction { get; set; } + public string? Email { get; set; } +} \ No newline at end of file From b859e53f9503b92a637043ee2ea82bfee156a0ea Mon Sep 17 00:00:00 2001 From: ikuzenkuna Date: Thu, 9 Oct 2025 16:34:12 +0200 Subject: [PATCH 02/18] Creating all setting Dto --- PyroFetes/DTO/Setting/Request/CreateSettingDto.cs | 7 +++++++ .../Setting/Request/PatchSettingElectronicSignatureDto.cs | 7 +++++++ PyroFetes/DTO/Setting/Request/PatchSettingLogoDto.cs | 7 +++++++ PyroFetes/DTO/Setting/Response/GetSettingDto.cs | 8 ++++++++ 4 files changed, 29 insertions(+) create mode 100644 PyroFetes/DTO/Setting/Request/CreateSettingDto.cs create mode 100644 PyroFetes/DTO/Setting/Request/PatchSettingElectronicSignatureDto.cs create mode 100644 PyroFetes/DTO/Setting/Request/PatchSettingLogoDto.cs create mode 100644 PyroFetes/DTO/Setting/Response/GetSettingDto.cs diff --git a/PyroFetes/DTO/Setting/Request/CreateSettingDto.cs b/PyroFetes/DTO/Setting/Request/CreateSettingDto.cs new file mode 100644 index 0000000..953b39a --- /dev/null +++ b/PyroFetes/DTO/Setting/Request/CreateSettingDto.cs @@ -0,0 +1,7 @@ +namespace PyroFetes.DTO.Setting.Request; + +public class CreateSettingDto +{ + public string? ElectronicSignature { get; set; } + public string? Logo { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Setting/Request/PatchSettingElectronicSignatureDto.cs b/PyroFetes/DTO/Setting/Request/PatchSettingElectronicSignatureDto.cs new file mode 100644 index 0000000..6ea2aa3 --- /dev/null +++ b/PyroFetes/DTO/Setting/Request/PatchSettingElectronicSignatureDto.cs @@ -0,0 +1,7 @@ +namespace PyroFetes.DTO.Setting.Request; + +public class PatchSettingElectronicSignatureDto +{ + public int Id { get; set; } + public string? ElectronicSignature { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Setting/Request/PatchSettingLogoDto.cs b/PyroFetes/DTO/Setting/Request/PatchSettingLogoDto.cs new file mode 100644 index 0000000..10b4f83 --- /dev/null +++ b/PyroFetes/DTO/Setting/Request/PatchSettingLogoDto.cs @@ -0,0 +1,7 @@ +namespace PyroFetes.DTO.Setting.Request; + +public class PatchSettingLogoDto +{ + public int Id { get; set; } + public string? Logo { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Setting/Response/GetSettingDto.cs b/PyroFetes/DTO/Setting/Response/GetSettingDto.cs new file mode 100644 index 0000000..c6ccbb7 --- /dev/null +++ b/PyroFetes/DTO/Setting/Response/GetSettingDto.cs @@ -0,0 +1,8 @@ +namespace PyroFetes.DTO.Setting.Response; + +public class GetSettingDto +{ + public int Id { get; set; } + public string? ElectronicSignature { get; set; } + public string? Logo { get; set; } +} \ No newline at end of file From 2d42fa10176dae2cb99a3571154620250f1af518 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 9 Oct 2025 16:46:22 +0200 Subject: [PATCH 03/18] Creating all PurchaseProduct DTO --- .../Request/CreatePurchaseProductDto.cs | 23 ++++++++++++++++++ .../PatchPurchaseProductQuantityDto.cs | 11 +++++++++ .../Request/UpdatePurchaseProductDto.cs | 24 +++++++++++++++++++ .../Response/GetPurchaseProductDto.cs | 24 +++++++++++++++++++ 4 files changed, 82 insertions(+) create mode 100644 PyroFetes/DTO/PurchaseProduct/Request/CreatePurchaseProductDto.cs create mode 100644 PyroFetes/DTO/PurchaseProduct/Request/PatchPurchaseProductQuantityDto.cs create mode 100644 PyroFetes/DTO/PurchaseProduct/Request/UpdatePurchaseProductDto.cs create mode 100644 PyroFetes/DTO/PurchaseProduct/Response/GetPurchaseProductDto.cs diff --git a/PyroFetes/DTO/PurchaseProduct/Request/CreatePurchaseProductDto.cs b/PyroFetes/DTO/PurchaseProduct/Request/CreatePurchaseProductDto.cs new file mode 100644 index 0000000..5b36db9 --- /dev/null +++ b/PyroFetes/DTO/PurchaseProduct/Request/CreatePurchaseProductDto.cs @@ -0,0 +1,23 @@ +namespace PyroFetes.DTO.PurchaseProduct.Request; + +public class CreatePurchaseProductDto +{ + public int Quantity { get; set; } + + public int ProductId { get; set; } + public int ProductReferences { get; set; } + public string? ProductName { get; set; } + public decimal ProductDuration {get; set;} + public decimal ProductCaliber { get; set; } + public int ProductApprovalNumber { get; set; } + public decimal ProductWeight { get; set; } + public decimal ProductNec { get; set; } + public decimal ProductSellingPrice { get; set; } + public string? ProductImage { get; set; } + public string? ProductLink { get; set; } + public int ProductMinimalQuantity { get; set; } + + + public int PurchaseOrderId { get; set; } + public string? PurchaseOrderPurchaseConditions { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/PurchaseProduct/Request/PatchPurchaseProductQuantityDto.cs b/PyroFetes/DTO/PurchaseProduct/Request/PatchPurchaseProductQuantityDto.cs new file mode 100644 index 0000000..785e6e6 --- /dev/null +++ b/PyroFetes/DTO/PurchaseProduct/Request/PatchPurchaseProductQuantityDto.cs @@ -0,0 +1,11 @@ +namespace PyroFetes.DTO.PurchaseProduct.Request; + +public class PatchPurchaseProductQuantityDto +{ + public int Id { get; set; } + public int Quantity { get; set; } + + public int ProductId { get; set; } + + public int PurchaseOrderId { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/PurchaseProduct/Request/UpdatePurchaseProductDto.cs b/PyroFetes/DTO/PurchaseProduct/Request/UpdatePurchaseProductDto.cs new file mode 100644 index 0000000..cb23f75 --- /dev/null +++ b/PyroFetes/DTO/PurchaseProduct/Request/UpdatePurchaseProductDto.cs @@ -0,0 +1,24 @@ +namespace PyroFetes.DTO.PurchaseProduct.Request; + +public class UpdatePurchaseProductDto +{ + public int Id { get; set; } + public int Quantity { get; set; } + + public int ProductId { get; set; } + public int ProductReferences { get; set; } + public string? ProductName { get; set; } + public decimal ProductDuration {get; set;} + public decimal ProductCaliber { get; set; } + public int ProductApprovalNumber { get; set; } + public decimal ProductWeight { get; set; } + public decimal ProductNec { get; set; } + public decimal ProductSellingPrice { get; set; } + public string? ProductImage { get; set; } + public string? ProductLink { get; set; } + public int ProductMinimalQuantity { get; set; } + + + public int PurchaseOrderId { get; set; } + public string? PurchaseOrderPurchaseConditions { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/PurchaseProduct/Response/GetPurchaseProductDto.cs b/PyroFetes/DTO/PurchaseProduct/Response/GetPurchaseProductDto.cs new file mode 100644 index 0000000..1858e3f --- /dev/null +++ b/PyroFetes/DTO/PurchaseProduct/Response/GetPurchaseProductDto.cs @@ -0,0 +1,24 @@ +namespace PyroFetes.DTO.PurchaseProduct.Response; + +public class GetPurchaseProductDto +{ + public int Id { get; set; } + public int Quantity { get; set; } + + public int ProductId { get; set; } + public int ProductReferences { get; set; } + public string? ProductName { get; set; } + public decimal ProductDuration {get; set;} + public decimal ProductCaliber { get; set; } + public int ProductApprovalNumber { get; set; } + public decimal ProductWeight { get; set; } + public decimal ProductNec { get; set; } + public decimal ProductSellingPrice { get; set; } + public string? ProductImage { get; set; } + public string? ProductLink { get; set; } + public int ProductMinimalQuantity { get; set; } + + + public int PurchaseOrderId { get; set; } + public string? PurchaseOrderPurchaseConditions { get; set; } +} \ No newline at end of file From 59ddb9f7b2bf29970a46f4dec7699e4495aa7257 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 9 Oct 2025 17:08:01 +0200 Subject: [PATCH 04/18] Creating all WareHouseProduct DTO --- .../Request/CreateWareHouseProductDto.cs | 28 +++++++++++++++++ .../PatchWareHouseProductQuantityDto.cs | 7 +++++ .../Request/UpdateWareHouseProductDto.cs | 29 +++++++++++++++++ .../Response/GetWareHouseProductDto.cs | 31 +++++++++++++++++++ 4 files changed, 95 insertions(+) create mode 100644 PyroFetes/DTO/PurchaseProduct/Request/CreateWareHouseProductDto.cs create mode 100644 PyroFetes/DTO/PurchaseProduct/Request/PatchWareHouseProductQuantityDto.cs create mode 100644 PyroFetes/DTO/PurchaseProduct/Request/UpdateWareHouseProductDto.cs create mode 100644 PyroFetes/DTO/PurchaseProduct/Response/GetWareHouseProductDto.cs diff --git a/PyroFetes/DTO/PurchaseProduct/Request/CreateWareHouseProductDto.cs b/PyroFetes/DTO/PurchaseProduct/Request/CreateWareHouseProductDto.cs new file mode 100644 index 0000000..a617180 --- /dev/null +++ b/PyroFetes/DTO/PurchaseProduct/Request/CreateWareHouseProductDto.cs @@ -0,0 +1,28 @@ +namespace PyroFetes.DTO.PurchaseProduct.Request; + +public class CreateWareHouseProductDto +{ + public int Quantity { get; set; } + + public int WareHouseId { get; set; } + public string? WareHouseName {get; set;} + public int WareHouseMaxWeight {get; set;} + public int WareHouseCurrent {get; set;} + public int WareHouseMinWeight {get; set;} + public string? WareHouseAddress { get; set; } + public int WareHouseZipCode { get; set; } + public string? WareHouseCity { get; set; } + + public int ProductId { get; set; } + public int ProductReferences { get; set; } + public string? ProductName { get; set; } + public decimal ProductDuration {get; set;} + public decimal ProductCaliber { get; set; } + public int ProductApprovalNumber { get; set; } + public decimal ProductWeight { get; set; } + public decimal ProductNec { get; set; } + public decimal ProductSellingPrice { get; set; } + public string? ProductImage { get; set; } + public string? ProductLink { get; set; } + public int ProductMinimalQuantity { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/PurchaseProduct/Request/PatchWareHouseProductQuantityDto.cs b/PyroFetes/DTO/PurchaseProduct/Request/PatchWareHouseProductQuantityDto.cs new file mode 100644 index 0000000..15a7cc0 --- /dev/null +++ b/PyroFetes/DTO/PurchaseProduct/Request/PatchWareHouseProductQuantityDto.cs @@ -0,0 +1,7 @@ +namespace PyroFetes.DTO.PurchaseProduct.Request; + +public class PatchWareHouseProductQuantityDto +{ + public int Id { get; set; } + public int Quantity { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/PurchaseProduct/Request/UpdateWareHouseProductDto.cs b/PyroFetes/DTO/PurchaseProduct/Request/UpdateWareHouseProductDto.cs new file mode 100644 index 0000000..302962c --- /dev/null +++ b/PyroFetes/DTO/PurchaseProduct/Request/UpdateWareHouseProductDto.cs @@ -0,0 +1,29 @@ +namespace PyroFetes.DTO.PurchaseProduct.Request; + +public class UpdateWareHouseProductDto +{ + public int Id { get; set; } + public int Quantity { get; set; } + + public int WareHouseId { get; set; } + public string? WareHouseName {get; set;} + public int WareHouseMaxWeight {get; set;} + public int WareHouseCurrent {get; set;} + public int WareHouseMinWeight {get; set;} + public string? WareHouseAddress { get; set; } + public int WareHouseZipCode { get; set; } + public string? WareHouseCity { get; set; } + + public int ProductId { get; set; } + public int ProductReferences { get; set; } + public string? ProductName { get; set; } + public decimal ProductDuration {get; set;} + public decimal ProductCaliber { get; set; } + public int ProductApprovalNumber { get; set; } + public decimal ProductWeight { get; set; } + public decimal ProductNec { get; set; } + public decimal ProductSellingPrice { get; set; } + public string? ProductImage { get; set; } + public string? ProductLink { get; set; } + public int ProductMinimalQuantity { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/PurchaseProduct/Response/GetWareHouseProductDto.cs b/PyroFetes/DTO/PurchaseProduct/Response/GetWareHouseProductDto.cs new file mode 100644 index 0000000..d2ec8a2 --- /dev/null +++ b/PyroFetes/DTO/PurchaseProduct/Response/GetWareHouseProductDto.cs @@ -0,0 +1,31 @@ +using PyroFetes.Models; + +namespace PyroFetes.DTO.PurchaseProduct.Response; + +public class GetWareHouseProductDto +{ + public int Id { get; set; } + public int Quantity { get; set; } + + public int WareHouseId { get; set; } + public string? WareHouseName {get; set;} + public int WareHouseMaxWeight {get; set;} + public int WareHouseCurrent {get; set;} + public int WareHouseMinWeight {get; set;} + public string? WareHouseAddress { get; set; } + public int WareHouseZipCode { get; set; } + public string? WareHouseCity { get; set; } + + public int ProductId { get; set; } + public int ProductReferences { get; set; } + public string? ProductName { get; set; } + public decimal ProductDuration {get; set;} + public decimal ProductCaliber { get; set; } + public int ProductApprovalNumber { get; set; } + public decimal ProductWeight { get; set; } + public decimal ProductNec { get; set; } + public decimal ProductSellingPrice { get; set; } + public string? ProductImage { get; set; } + public string? ProductLink { get; set; } + public int ProductMinimalQuantity { get; set; } +} \ No newline at end of file From 64fd223a6339e6d9b89cda4d37e0a2c287e0df7a Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 9 Oct 2025 17:09:33 +0200 Subject: [PATCH 05/18] Fix an error in PatchPurchaseProductQuantityDto.cs --- .../Request/PatchPurchaseProductQuantityDto.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/PyroFetes/DTO/PurchaseProduct/Request/PatchPurchaseProductQuantityDto.cs b/PyroFetes/DTO/PurchaseProduct/Request/PatchPurchaseProductQuantityDto.cs index 785e6e6..9389244 100644 --- a/PyroFetes/DTO/PurchaseProduct/Request/PatchPurchaseProductQuantityDto.cs +++ b/PyroFetes/DTO/PurchaseProduct/Request/PatchPurchaseProductQuantityDto.cs @@ -4,8 +4,4 @@ public class PatchPurchaseProductQuantityDto { public int Id { get; set; } public int Quantity { get; set; } - - public int ProductId { get; set; } - - public int PurchaseOrderId { get; set; } } \ No newline at end of file From b1d2d3d1a132b631fc88d7458797ac71e55592a2 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 9 Oct 2025 17:25:48 +0200 Subject: [PATCH 06/18] Creating all QuotationProductDTO --- .../Request/CreateQuotationProductDto.cs | 23 ++++++++++++++++++ .../PatchQuotationProductQuantityDto.cs | 7 ++++++ .../Request/UpdateQuotationProductDto.cs | 24 +++++++++++++++++++ .../Response/GetQuotationProductDto.cs | 24 +++++++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 PyroFetes/DTO/QuotationProduct/Request/CreateQuotationProductDto.cs create mode 100644 PyroFetes/DTO/QuotationProduct/Request/PatchQuotationProductQuantityDto.cs create mode 100644 PyroFetes/DTO/QuotationProduct/Request/UpdateQuotationProductDto.cs create mode 100644 PyroFetes/DTO/QuotationProduct/Response/GetQuotationProductDto.cs diff --git a/PyroFetes/DTO/QuotationProduct/Request/CreateQuotationProductDto.cs b/PyroFetes/DTO/QuotationProduct/Request/CreateQuotationProductDto.cs new file mode 100644 index 0000000..0e11b5e --- /dev/null +++ b/PyroFetes/DTO/QuotationProduct/Request/CreateQuotationProductDto.cs @@ -0,0 +1,23 @@ +namespace PyroFetes.DTO.QuotationProduct.Request; + +public class CreateQuotationProductDto +{ + public int Quantity { get; set; } + + public int QuotationId { get; set; } + public string? QuotationMessage { get; set; } + public string? QuotationConditionsSale { get; set; } + + public int ProductId { get; set; } + public int ProductReferences { get; set; } + public string? ProductName { get; set; } + public decimal ProductDuration {get; set;} + public decimal ProductCaliber { get; set; } + public int ProductApprovalNumber { get; set; } + public decimal ProductWeight { get; set; } + public decimal ProductNec { get; set; } + public decimal ProductSellingPrice { get; set; } + public string? ProductImage { get; set; } + public string? ProductLink { get; set; } + public int ProductMinimalQuantity { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/QuotationProduct/Request/PatchQuotationProductQuantityDto.cs b/PyroFetes/DTO/QuotationProduct/Request/PatchQuotationProductQuantityDto.cs new file mode 100644 index 0000000..2428f49 --- /dev/null +++ b/PyroFetes/DTO/QuotationProduct/Request/PatchQuotationProductQuantityDto.cs @@ -0,0 +1,7 @@ +namespace PyroFetes.DTO.QuotationProduct.Request; + +public class PatchQuotationProductQuantityDto +{ + public int Id { get; set; } + public int Quantity { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/QuotationProduct/Request/UpdateQuotationProductDto.cs b/PyroFetes/DTO/QuotationProduct/Request/UpdateQuotationProductDto.cs new file mode 100644 index 0000000..46f9d6c --- /dev/null +++ b/PyroFetes/DTO/QuotationProduct/Request/UpdateQuotationProductDto.cs @@ -0,0 +1,24 @@ +namespace PyroFetes.DTO.QuotationProduct.Request; + +public class UpdateQuotationProductDto +{ + public int Id { get; set; } + public int Quantity { get; set; } + + public int QuotationId { get; set; } + public string? QuotationMessage { get; set; } + public string? QuotationConditionsSale { get; set; } + + public int ProductId { get; set; } + public int ProductReferences { get; set; } + public string? ProductName { get; set; } + public decimal ProductDuration {get; set;} + public decimal ProductCaliber { get; set; } + public int ProductApprovalNumber { get; set; } + public decimal ProductWeight { get; set; } + public decimal ProductNec { get; set; } + public decimal ProductSellingPrice { get; set; } + public string? ProductImage { get; set; } + public string? ProductLink { get; set; } + public int ProductMinimalQuantity { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/QuotationProduct/Response/GetQuotationProductDto.cs b/PyroFetes/DTO/QuotationProduct/Response/GetQuotationProductDto.cs new file mode 100644 index 0000000..b910ab3 --- /dev/null +++ b/PyroFetes/DTO/QuotationProduct/Response/GetQuotationProductDto.cs @@ -0,0 +1,24 @@ +namespace PyroFetes.DTO.QuotationProduct.Response; + +public class GetQuotationProductDto +{ + public int Id { get; set; } + public int Quantity { get; set; } + + public int QuotationId { get; set; } + public string? QuotationMessage { get; set; } + public string? QuotationConditionsSale { get; set; } + + public int ProductId { get; set; } + public int ProductReferences { get; set; } + public string? ProductName { get; set; } + public decimal ProductDuration {get; set;} + public decimal ProductCaliber { get; set; } + public int ProductApprovalNumber { get; set; } + public decimal ProductWeight { get; set; } + public decimal ProductNec { get; set; } + public decimal ProductSellingPrice { get; set; } + public string? ProductImage { get; set; } + public string? ProductLink { get; set; } + public int ProductMinimalQuantity { get; set; } +} \ No newline at end of file From d0f20e08f0550178a92eb4bead3c5696dff0602d Mon Sep 17 00:00:00 2001 From: ikuzenkuna Date: Thu, 9 Oct 2025 17:34:46 +0200 Subject: [PATCH 07/18] Fix an error in Setting directory --- .../DTO/{Setting => SettingDTO}/Request/CreateSettingDto.cs | 2 +- .../Request/PatchSettingElectronicSignatureDto.cs | 2 +- .../DTO/{Setting => SettingDTO}/Request/PatchSettingLogoDto.cs | 2 +- PyroFetes/DTO/{Setting => SettingDTO}/Response/GetSettingDto.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename PyroFetes/DTO/{Setting => SettingDTO}/Request/CreateSettingDto.cs (73%) rename PyroFetes/DTO/{Setting => SettingDTO}/Request/PatchSettingElectronicSignatureDto.cs (75%) rename PyroFetes/DTO/{Setting => SettingDTO}/Request/PatchSettingLogoDto.cs (70%) rename PyroFetes/DTO/{Setting => SettingDTO}/Response/GetSettingDto.cs (77%) diff --git a/PyroFetes/DTO/Setting/Request/CreateSettingDto.cs b/PyroFetes/DTO/SettingDTO/Request/CreateSettingDto.cs similarity index 73% rename from PyroFetes/DTO/Setting/Request/CreateSettingDto.cs rename to PyroFetes/DTO/SettingDTO/Request/CreateSettingDto.cs index 953b39a..56146d3 100644 --- a/PyroFetes/DTO/Setting/Request/CreateSettingDto.cs +++ b/PyroFetes/DTO/SettingDTO/Request/CreateSettingDto.cs @@ -1,4 +1,4 @@ -namespace PyroFetes.DTO.Setting.Request; +namespace PyroFetes.DTO.SettingDTO.Request; public class CreateSettingDto { diff --git a/PyroFetes/DTO/Setting/Request/PatchSettingElectronicSignatureDto.cs b/PyroFetes/DTO/SettingDTO/Request/PatchSettingElectronicSignatureDto.cs similarity index 75% rename from PyroFetes/DTO/Setting/Request/PatchSettingElectronicSignatureDto.cs rename to PyroFetes/DTO/SettingDTO/Request/PatchSettingElectronicSignatureDto.cs index 6ea2aa3..44e567e 100644 --- a/PyroFetes/DTO/Setting/Request/PatchSettingElectronicSignatureDto.cs +++ b/PyroFetes/DTO/SettingDTO/Request/PatchSettingElectronicSignatureDto.cs @@ -1,4 +1,4 @@ -namespace PyroFetes.DTO.Setting.Request; +namespace PyroFetes.DTO.SettingDTO.Request; public class PatchSettingElectronicSignatureDto { diff --git a/PyroFetes/DTO/Setting/Request/PatchSettingLogoDto.cs b/PyroFetes/DTO/SettingDTO/Request/PatchSettingLogoDto.cs similarity index 70% rename from PyroFetes/DTO/Setting/Request/PatchSettingLogoDto.cs rename to PyroFetes/DTO/SettingDTO/Request/PatchSettingLogoDto.cs index 10b4f83..58a952e 100644 --- a/PyroFetes/DTO/Setting/Request/PatchSettingLogoDto.cs +++ b/PyroFetes/DTO/SettingDTO/Request/PatchSettingLogoDto.cs @@ -1,4 +1,4 @@ -namespace PyroFetes.DTO.Setting.Request; +namespace PyroFetes.DTO.SettingDTO.Request; public class PatchSettingLogoDto { diff --git a/PyroFetes/DTO/Setting/Response/GetSettingDto.cs b/PyroFetes/DTO/SettingDTO/Response/GetSettingDto.cs similarity index 77% rename from PyroFetes/DTO/Setting/Response/GetSettingDto.cs rename to PyroFetes/DTO/SettingDTO/Response/GetSettingDto.cs index c6ccbb7..7eb8232 100644 --- a/PyroFetes/DTO/Setting/Response/GetSettingDto.cs +++ b/PyroFetes/DTO/SettingDTO/Response/GetSettingDto.cs @@ -1,4 +1,4 @@ -namespace PyroFetes.DTO.Setting.Response; +namespace PyroFetes.DTO.SettingDTO.Response; public class GetSettingDto { From f0ec7cd4d47f1dd98c09c32dd98306d7f17017cc Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 9 Oct 2025 17:43:32 +0200 Subject: [PATCH 08/18] Fix --- .../Request/CreateWareHouseProductDto.cs | 2 +- .../Request/PatchWareHouseProductQuantityDto.cs | 2 +- .../Request/UpdateWareHouseProductDto.cs | 2 +- .../Response/GetWareHouseProductDto.cs | 4 +--- 4 files changed, 4 insertions(+), 6 deletions(-) rename PyroFetes/DTO/{PurchaseProduct => WareHouseProduct}/Request/CreateWareHouseProductDto.cs (95%) rename PyroFetes/DTO/{PurchaseProduct => WareHouseProduct}/Request/PatchWareHouseProductQuantityDto.cs (70%) rename PyroFetes/DTO/{PurchaseProduct => WareHouseProduct}/Request/UpdateWareHouseProductDto.cs (95%) rename PyroFetes/DTO/{PurchaseProduct => WareHouseProduct}/Response/GetWareHouseProductDto.cs (93%) diff --git a/PyroFetes/DTO/PurchaseProduct/Request/CreateWareHouseProductDto.cs b/PyroFetes/DTO/WareHouseProduct/Request/CreateWareHouseProductDto.cs similarity index 95% rename from PyroFetes/DTO/PurchaseProduct/Request/CreateWareHouseProductDto.cs rename to PyroFetes/DTO/WareHouseProduct/Request/CreateWareHouseProductDto.cs index a617180..72415f5 100644 --- a/PyroFetes/DTO/PurchaseProduct/Request/CreateWareHouseProductDto.cs +++ b/PyroFetes/DTO/WareHouseProduct/Request/CreateWareHouseProductDto.cs @@ -1,4 +1,4 @@ -namespace PyroFetes.DTO.PurchaseProduct.Request; +namespace PyroFetes.DTO.WareHouseProduct.Request; public class CreateWareHouseProductDto { diff --git a/PyroFetes/DTO/PurchaseProduct/Request/PatchWareHouseProductQuantityDto.cs b/PyroFetes/DTO/WareHouseProduct/Request/PatchWareHouseProductQuantityDto.cs similarity index 70% rename from PyroFetes/DTO/PurchaseProduct/Request/PatchWareHouseProductQuantityDto.cs rename to PyroFetes/DTO/WareHouseProduct/Request/PatchWareHouseProductQuantityDto.cs index 15a7cc0..6bc95ad 100644 --- a/PyroFetes/DTO/PurchaseProduct/Request/PatchWareHouseProductQuantityDto.cs +++ b/PyroFetes/DTO/WareHouseProduct/Request/PatchWareHouseProductQuantityDto.cs @@ -1,4 +1,4 @@ -namespace PyroFetes.DTO.PurchaseProduct.Request; +namespace PyroFetes.DTO.WareHouseProduct.Request; public class PatchWareHouseProductQuantityDto { diff --git a/PyroFetes/DTO/PurchaseProduct/Request/UpdateWareHouseProductDto.cs b/PyroFetes/DTO/WareHouseProduct/Request/UpdateWareHouseProductDto.cs similarity index 95% rename from PyroFetes/DTO/PurchaseProduct/Request/UpdateWareHouseProductDto.cs rename to PyroFetes/DTO/WareHouseProduct/Request/UpdateWareHouseProductDto.cs index 302962c..4237fae 100644 --- a/PyroFetes/DTO/PurchaseProduct/Request/UpdateWareHouseProductDto.cs +++ b/PyroFetes/DTO/WareHouseProduct/Request/UpdateWareHouseProductDto.cs @@ -1,4 +1,4 @@ -namespace PyroFetes.DTO.PurchaseProduct.Request; +namespace PyroFetes.DTO.WareHouseProduct.Request; public class UpdateWareHouseProductDto { diff --git a/PyroFetes/DTO/PurchaseProduct/Response/GetWareHouseProductDto.cs b/PyroFetes/DTO/WareHouseProduct/Response/GetWareHouseProductDto.cs similarity index 93% rename from PyroFetes/DTO/PurchaseProduct/Response/GetWareHouseProductDto.cs rename to PyroFetes/DTO/WareHouseProduct/Response/GetWareHouseProductDto.cs index d2ec8a2..2e66e62 100644 --- a/PyroFetes/DTO/PurchaseProduct/Response/GetWareHouseProductDto.cs +++ b/PyroFetes/DTO/WareHouseProduct/Response/GetWareHouseProductDto.cs @@ -1,6 +1,4 @@ -using PyroFetes.Models; - -namespace PyroFetes.DTO.PurchaseProduct.Response; +namespace PyroFetes.DTO.WareHouseProduct.Response; public class GetWareHouseProductDto { From a262fb094c30ac974b345a846b7166bbf3c00407 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 9 Oct 2025 17:47:12 +0200 Subject: [PATCH 09/18] Creating all supplier dto --- PyroFetes/DTO/Supplier/Request/CreateSupplierDto.cs | 12 ++++++++++++ .../Request/PatchSupplierDeliveryDelayDto.cs | 7 +++++++ PyroFetes/DTO/Supplier/Request/UpdateSupplierDto.cs | 13 +++++++++++++ PyroFetes/DTO/Supplier/Response/GetSupplierDto.cs | 13 +++++++++++++ 4 files changed, 45 insertions(+) create mode 100644 PyroFetes/DTO/Supplier/Request/CreateSupplierDto.cs create mode 100644 PyroFetes/DTO/Supplier/Request/PatchSupplierDeliveryDelayDto.cs create mode 100644 PyroFetes/DTO/Supplier/Request/UpdateSupplierDto.cs create mode 100644 PyroFetes/DTO/Supplier/Response/GetSupplierDto.cs diff --git a/PyroFetes/DTO/Supplier/Request/CreateSupplierDto.cs b/PyroFetes/DTO/Supplier/Request/CreateSupplierDto.cs new file mode 100644 index 0000000..b9e9fe0 --- /dev/null +++ b/PyroFetes/DTO/Supplier/Request/CreateSupplierDto.cs @@ -0,0 +1,12 @@ +namespace PyroFetes.DTO.Supplier.Request; + +public class CreateSupplierDto +{ + public string? Name { get; set; } + public string? Email { get; set; } + public string? Phone { get; set; } + public string? Address { get; set; } + public int ZipCode { get; set; } + public string? City { get; set; } + public int DeliveryDelay { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Supplier/Request/PatchSupplierDeliveryDelayDto.cs b/PyroFetes/DTO/Supplier/Request/PatchSupplierDeliveryDelayDto.cs new file mode 100644 index 0000000..a5e8fbc --- /dev/null +++ b/PyroFetes/DTO/Supplier/Request/PatchSupplierDeliveryDelayDto.cs @@ -0,0 +1,7 @@ +namespace PyroFetes.DTO.Supplier.Request; + +public class PatchSupplierDeliveryDelayDto +{ + public int Id { get; set; } + public int DeliveryDelay { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Supplier/Request/UpdateSupplierDto.cs b/PyroFetes/DTO/Supplier/Request/UpdateSupplierDto.cs new file mode 100644 index 0000000..b69b72b --- /dev/null +++ b/PyroFetes/DTO/Supplier/Request/UpdateSupplierDto.cs @@ -0,0 +1,13 @@ +namespace PyroFetes.DTO.Supplier.Request; + +public class UpdateSupplierDto +{ + public int Id { get; set; } + public string? Name { get; set; } + public string? Email { get; set; } + public string? Phone { get; set; } + public string? Address { get; set; } + public int ZipCode { get; set; } + public string? City { get; set; } + public int DeliveryDelay { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Supplier/Response/GetSupplierDto.cs b/PyroFetes/DTO/Supplier/Response/GetSupplierDto.cs new file mode 100644 index 0000000..7390854 --- /dev/null +++ b/PyroFetes/DTO/Supplier/Response/GetSupplierDto.cs @@ -0,0 +1,13 @@ +namespace PyroFetes.DTO.Supplier.Response; + +public class GetSupplierDto +{ + public int Id { get; set; } + public string? Name { get; set; } + public string? Email { get; set; } + public string? Phone { get; set; } + public string? Address { get; set; } + public int ZipCode { get; set; } + public string? City { get; set; } + public int DeliveryDelay { get; set; } +} \ No newline at end of file From 25d1407bd22292a3074a7427334c42f1720e1571 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 9 Oct 2025 17:54:28 +0200 Subject: [PATCH 10/18] Creating of all product dto --- .../DTO/Product/Request/CreateProductDto.cs | 16 ++++++++++++++++ .../Request/PatchProductMinimalStockDto.cs | 7 +++++++ .../DTO/Product/Request/UpdateProductDto.cs | 17 +++++++++++++++++ PyroFetes/DTO/Product/Response/GetProductDto.cs | 17 +++++++++++++++++ 4 files changed, 57 insertions(+) create mode 100644 PyroFetes/DTO/Product/Request/CreateProductDto.cs create mode 100644 PyroFetes/DTO/Product/Request/PatchProductMinimalStockDto.cs create mode 100644 PyroFetes/DTO/Product/Request/UpdateProductDto.cs create mode 100644 PyroFetes/DTO/Product/Response/GetProductDto.cs diff --git a/PyroFetes/DTO/Product/Request/CreateProductDto.cs b/PyroFetes/DTO/Product/Request/CreateProductDto.cs new file mode 100644 index 0000000..03ef300 --- /dev/null +++ b/PyroFetes/DTO/Product/Request/CreateProductDto.cs @@ -0,0 +1,16 @@ +namespace PyroFetes.DTO.Product.Request; + +public class CreateProductDto +{ + public int References { get; set; } + public string? Name { get; set; } + public decimal Duration {get; set;} + public decimal Caliber { get; set; } + public int ApprovalNumber { get; set; } + public decimal Weight { get; set; } + public decimal Nec { get; set; } + public decimal SellingPrice { get; set; } + public string? Image { get; set; } + public string? Link { get; set; } + public int MinimalQuantity { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Product/Request/PatchProductMinimalStockDto.cs b/PyroFetes/DTO/Product/Request/PatchProductMinimalStockDto.cs new file mode 100644 index 0000000..424f666 --- /dev/null +++ b/PyroFetes/DTO/Product/Request/PatchProductMinimalStockDto.cs @@ -0,0 +1,7 @@ +namespace PyroFetes.DTO.Product.Request; + +public class PatchProductMinimalStockDto +{ + public int Id { get; set; } + public int MinimalQuantity { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Product/Request/UpdateProductDto.cs b/PyroFetes/DTO/Product/Request/UpdateProductDto.cs new file mode 100644 index 0000000..499602a --- /dev/null +++ b/PyroFetes/DTO/Product/Request/UpdateProductDto.cs @@ -0,0 +1,17 @@ +namespace PyroFetes.DTO.Product.Request; + +public class UpdateProductDto +{ + public int Id { get; set; } + public int References { get; set; } + public string? Name { get; set; } + public decimal Duration {get; set;} + public decimal Caliber { get; set; } + public int ApprovalNumber { get; set; } + public decimal Weight { get; set; } + public decimal Nec { get; set; } + public decimal SellingPrice { get; set; } + public string? Image { get; set; } + public string? Link { get; set; } + public int MinimalQuantity { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Product/Response/GetProductDto.cs b/PyroFetes/DTO/Product/Response/GetProductDto.cs new file mode 100644 index 0000000..bf69644 --- /dev/null +++ b/PyroFetes/DTO/Product/Response/GetProductDto.cs @@ -0,0 +1,17 @@ +namespace PyroFetes.DTO.Product.Response; + +public class GetProductDto +{ + public int Id { get; set; } + public int References { get; set; } + public string? Name { get; set; } + public decimal Duration {get; set;} + public decimal Caliber { get; set; } + public int ApprovalNumber { get; set; } + public decimal Weight { get; set; } + public decimal Nec { get; set; } + public decimal SellingPrice { get; set; } + public string? Image { get; set; } + public string? Link { get; set; } + public int MinimalQuantity { get; set; } +} \ No newline at end of file From 464869e3ca3cb1b2b4e463821f7889dcc0bd6838 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 9 Oct 2025 19:00:55 +0100 Subject: [PATCH 11/18] Creating of all price dto --- PyroFetes/DTO/Price/Request/CreatePriceDto.cs | 27 ++++++++++++++++++ .../Request/PatchPriceSellingPriceDto.cs | 7 +++++ PyroFetes/DTO/Price/Request/UpdatePriceDto.cs | 28 +++++++++++++++++++ PyroFetes/DTO/Price/Response/GetPriceDto.cs | 28 +++++++++++++++++++ 4 files changed, 90 insertions(+) create mode 100644 PyroFetes/DTO/Price/Request/CreatePriceDto.cs create mode 100644 PyroFetes/DTO/Price/Request/PatchPriceSellingPriceDto.cs create mode 100644 PyroFetes/DTO/Price/Request/UpdatePriceDto.cs create mode 100644 PyroFetes/DTO/Price/Response/GetPriceDto.cs diff --git a/PyroFetes/DTO/Price/Request/CreatePriceDto.cs b/PyroFetes/DTO/Price/Request/CreatePriceDto.cs new file mode 100644 index 0000000..f268d21 --- /dev/null +++ b/PyroFetes/DTO/Price/Request/CreatePriceDto.cs @@ -0,0 +1,27 @@ +namespace PyroFetes.DTO.Price.Request; + +public class CreatePriceDto +{ + public decimal SellingPrice { get; set; } + + public int SupplierId { get; set; } + public string? SupplierName { get; set; } + public string? SupplierEmail { get; set; } + public string? SupplierPhone { get; set; } + public string? SupplierAddress { get; set; } + public int SupplierZipCode { get; set; } + public string? SupplierCity { get; set; } + public int SupplierDeliveryDelay { get; set; } + + public int ProductId { get; set; } + public int ProductReferences { get; set; } + public string? ProductName { get; set; } + public decimal ProductDuration {get; set;} + public decimal ProductCaliber { get; set; } + public int ProductApprovalNumber { get; set; } + public decimal ProductWeight { get; set; } + public decimal ProductNec { get; set; } + public string? ProductImage { get; set; } + public string? ProductLink { get; set; } + public int ProductMinimalQuantity { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Price/Request/PatchPriceSellingPriceDto.cs b/PyroFetes/DTO/Price/Request/PatchPriceSellingPriceDto.cs new file mode 100644 index 0000000..5692248 --- /dev/null +++ b/PyroFetes/DTO/Price/Request/PatchPriceSellingPriceDto.cs @@ -0,0 +1,7 @@ +namespace PyroFetes.DTO.Price.Request; + +public class PatchPriceSellingPriceDto +{ + public int Id { get; set; } + public decimal SellingPrice { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Price/Request/UpdatePriceDto.cs b/PyroFetes/DTO/Price/Request/UpdatePriceDto.cs new file mode 100644 index 0000000..6f6af24 --- /dev/null +++ b/PyroFetes/DTO/Price/Request/UpdatePriceDto.cs @@ -0,0 +1,28 @@ +namespace PyroFetes.DTO.Price.Request; + +public class UpdatePriceDto +{ + public int Id { get; set; } + public decimal SellingPrice { get; set; } + + public int SupplierId { get; set; } + public string? SupplierName { get; set; } + public string? SupplierEmail { get; set; } + public string? SupplierPhone { get; set; } + public string? SupplierAddress { get; set; } + public int SupplierZipCode { get; set; } + public string? SupplierCity { get; set; } + public int SupplierDeliveryDelay { get; set; } + + public int ProductId { get; set; } + public int ProductReferences { get; set; } + public string? ProductName { get; set; } + public decimal ProductDuration {get; set;} + public decimal ProductCaliber { get; set; } + public int ProductApprovalNumber { get; set; } + public decimal ProductWeight { get; set; } + public decimal ProductNec { get; set; } + public string? ProductImage { get; set; } + public string? ProductLink { get; set; } + public int ProductMinimalQuantity { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/DTO/Price/Response/GetPriceDto.cs b/PyroFetes/DTO/Price/Response/GetPriceDto.cs new file mode 100644 index 0000000..81a8f07 --- /dev/null +++ b/PyroFetes/DTO/Price/Response/GetPriceDto.cs @@ -0,0 +1,28 @@ +namespace PyroFetes.DTO.Price.Response; + +public class GetPriceDto +{ + public int Id { get; set; } + public decimal SellingPrice { get; set; } + + public int SupplierId { get; set; } + public string? SupplierName { get; set; } + public string? SupplierEmail { get; set; } + public string? SupplierPhone { get; set; } + public string? SupplierAddress { get; set; } + public int SupplierZipCode { get; set; } + public string? SupplierCity { get; set; } + public int SupplierDeliveryDelay { get; set; } + + public int ProductId { get; set; } + public int ProductReferences { get; set; } + public string? ProductName { get; set; } + public decimal ProductDuration {get; set;} + public decimal ProductCaliber { get; set; } + public int ProductApprovalNumber { get; set; } + public decimal ProductWeight { get; set; } + public decimal ProductNec { get; set; } + public string? ProductImage { get; set; } + public string? ProductLink { get; set; } + public int ProductMinimalQuantity { get; set; } +} \ No newline at end of file From ddbd662c2a78cefac37fd2bac3287c71ea843531 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 9 Oct 2025 19:02:09 +0100 Subject: [PATCH 12/18] fix an error in product attribute --- PyroFetes/DTO/Product/Request/CreateProductDto.cs | 1 - PyroFetes/DTO/Product/Request/UpdateProductDto.cs | 1 - PyroFetes/DTO/Product/Response/GetProductDto.cs | 1 - 3 files changed, 3 deletions(-) diff --git a/PyroFetes/DTO/Product/Request/CreateProductDto.cs b/PyroFetes/DTO/Product/Request/CreateProductDto.cs index 03ef300..24ecf17 100644 --- a/PyroFetes/DTO/Product/Request/CreateProductDto.cs +++ b/PyroFetes/DTO/Product/Request/CreateProductDto.cs @@ -9,7 +9,6 @@ public class CreateProductDto public int ApprovalNumber { get; set; } public decimal Weight { get; set; } public decimal Nec { get; set; } - public decimal SellingPrice { get; set; } public string? Image { get; set; } public string? Link { get; set; } public int MinimalQuantity { get; set; } diff --git a/PyroFetes/DTO/Product/Request/UpdateProductDto.cs b/PyroFetes/DTO/Product/Request/UpdateProductDto.cs index 499602a..0548119 100644 --- a/PyroFetes/DTO/Product/Request/UpdateProductDto.cs +++ b/PyroFetes/DTO/Product/Request/UpdateProductDto.cs @@ -10,7 +10,6 @@ public class UpdateProductDto public int ApprovalNumber { get; set; } public decimal Weight { get; set; } public decimal Nec { get; set; } - public decimal SellingPrice { get; set; } public string? Image { get; set; } public string? Link { get; set; } public int MinimalQuantity { get; set; } diff --git a/PyroFetes/DTO/Product/Response/GetProductDto.cs b/PyroFetes/DTO/Product/Response/GetProductDto.cs index bf69644..6781381 100644 --- a/PyroFetes/DTO/Product/Response/GetProductDto.cs +++ b/PyroFetes/DTO/Product/Response/GetProductDto.cs @@ -10,7 +10,6 @@ public class GetProductDto public int ApprovalNumber { get; set; } public decimal Weight { get; set; } public decimal Nec { get; set; } - public decimal SellingPrice { get; set; } public string? Image { get; set; } public string? Link { get; set; } public int MinimalQuantity { get; set; } From a27cb5cf2ac8740615e61ee14e692ed630e38c58 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 9 Oct 2025 19:03:09 +0100 Subject: [PATCH 13/18] fix an error --- .../DTO/PurchaseProduct/Request/CreatePurchaseProductDto.cs | 1 - .../DTO/PurchaseProduct/Request/UpdatePurchaseProductDto.cs | 1 - 2 files changed, 2 deletions(-) diff --git a/PyroFetes/DTO/PurchaseProduct/Request/CreatePurchaseProductDto.cs b/PyroFetes/DTO/PurchaseProduct/Request/CreatePurchaseProductDto.cs index 5b36db9..bac3997 100644 --- a/PyroFetes/DTO/PurchaseProduct/Request/CreatePurchaseProductDto.cs +++ b/PyroFetes/DTO/PurchaseProduct/Request/CreatePurchaseProductDto.cs @@ -12,7 +12,6 @@ public class CreatePurchaseProductDto public int ProductApprovalNumber { get; set; } public decimal ProductWeight { get; set; } public decimal ProductNec { get; set; } - public decimal ProductSellingPrice { get; set; } public string? ProductImage { get; set; } public string? ProductLink { get; set; } public int ProductMinimalQuantity { get; set; } diff --git a/PyroFetes/DTO/PurchaseProduct/Request/UpdatePurchaseProductDto.cs b/PyroFetes/DTO/PurchaseProduct/Request/UpdatePurchaseProductDto.cs index cb23f75..0b2f039 100644 --- a/PyroFetes/DTO/PurchaseProduct/Request/UpdatePurchaseProductDto.cs +++ b/PyroFetes/DTO/PurchaseProduct/Request/UpdatePurchaseProductDto.cs @@ -13,7 +13,6 @@ public class UpdatePurchaseProductDto public int ProductApprovalNumber { get; set; } public decimal ProductWeight { get; set; } public decimal ProductNec { get; set; } - public decimal ProductSellingPrice { get; set; } public string? ProductImage { get; set; } public string? ProductLink { get; set; } public int ProductMinimalQuantity { get; set; } From 15526d15893300eba1f0ddd859d164ce646843b8 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 9 Oct 2025 19:04:22 +0100 Subject: [PATCH 14/18] delete productsellingprice --- .../DTO/QuotationProduct/Request/CreateQuotationProductDto.cs | 1 - .../DTO/QuotationProduct/Request/UpdateQuotationProductDto.cs | 1 - .../DTO/QuotationProduct/Response/GetQuotationProductDto.cs | 1 - 3 files changed, 3 deletions(-) diff --git a/PyroFetes/DTO/QuotationProduct/Request/CreateQuotationProductDto.cs b/PyroFetes/DTO/QuotationProduct/Request/CreateQuotationProductDto.cs index 0e11b5e..86610d4 100644 --- a/PyroFetes/DTO/QuotationProduct/Request/CreateQuotationProductDto.cs +++ b/PyroFetes/DTO/QuotationProduct/Request/CreateQuotationProductDto.cs @@ -16,7 +16,6 @@ public class CreateQuotationProductDto public int ProductApprovalNumber { get; set; } public decimal ProductWeight { get; set; } public decimal ProductNec { get; set; } - public decimal ProductSellingPrice { get; set; } public string? ProductImage { get; set; } public string? ProductLink { get; set; } public int ProductMinimalQuantity { get; set; } diff --git a/PyroFetes/DTO/QuotationProduct/Request/UpdateQuotationProductDto.cs b/PyroFetes/DTO/QuotationProduct/Request/UpdateQuotationProductDto.cs index 46f9d6c..0247b6f 100644 --- a/PyroFetes/DTO/QuotationProduct/Request/UpdateQuotationProductDto.cs +++ b/PyroFetes/DTO/QuotationProduct/Request/UpdateQuotationProductDto.cs @@ -17,7 +17,6 @@ public class UpdateQuotationProductDto public int ProductApprovalNumber { get; set; } public decimal ProductWeight { get; set; } public decimal ProductNec { get; set; } - public decimal ProductSellingPrice { get; set; } public string? ProductImage { get; set; } public string? ProductLink { get; set; } public int ProductMinimalQuantity { get; set; } diff --git a/PyroFetes/DTO/QuotationProduct/Response/GetQuotationProductDto.cs b/PyroFetes/DTO/QuotationProduct/Response/GetQuotationProductDto.cs index b910ab3..c5a4ca0 100644 --- a/PyroFetes/DTO/QuotationProduct/Response/GetQuotationProductDto.cs +++ b/PyroFetes/DTO/QuotationProduct/Response/GetQuotationProductDto.cs @@ -17,7 +17,6 @@ public class GetQuotationProductDto public int ProductApprovalNumber { get; set; } public decimal ProductWeight { get; set; } public decimal ProductNec { get; set; } - public decimal ProductSellingPrice { get; set; } public string? ProductImage { get; set; } public string? ProductLink { get; set; } public int ProductMinimalQuantity { get; set; } From e69ca1898d65d3e16f64b6c6e9d2416a925978fc Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Thu, 9 Oct 2025 19:06:11 +0100 Subject: [PATCH 15/18] delete productsellingprice --- .../DTO/WareHouseProduct/Request/CreateWareHouseProductDto.cs | 1 - .../DTO/WareHouseProduct/Request/UpdateWareHouseProductDto.cs | 1 - .../DTO/WareHouseProduct/Response/GetWareHouseProductDto.cs | 1 - 3 files changed, 3 deletions(-) diff --git a/PyroFetes/DTO/WareHouseProduct/Request/CreateWareHouseProductDto.cs b/PyroFetes/DTO/WareHouseProduct/Request/CreateWareHouseProductDto.cs index 72415f5..9b2a142 100644 --- a/PyroFetes/DTO/WareHouseProduct/Request/CreateWareHouseProductDto.cs +++ b/PyroFetes/DTO/WareHouseProduct/Request/CreateWareHouseProductDto.cs @@ -21,7 +21,6 @@ public class CreateWareHouseProductDto public int ProductApprovalNumber { get; set; } public decimal ProductWeight { get; set; } public decimal ProductNec { get; set; } - public decimal ProductSellingPrice { get; set; } public string? ProductImage { get; set; } public string? ProductLink { get; set; } public int ProductMinimalQuantity { get; set; } diff --git a/PyroFetes/DTO/WareHouseProduct/Request/UpdateWareHouseProductDto.cs b/PyroFetes/DTO/WareHouseProduct/Request/UpdateWareHouseProductDto.cs index 4237fae..299d0c3 100644 --- a/PyroFetes/DTO/WareHouseProduct/Request/UpdateWareHouseProductDto.cs +++ b/PyroFetes/DTO/WareHouseProduct/Request/UpdateWareHouseProductDto.cs @@ -22,7 +22,6 @@ public class UpdateWareHouseProductDto public int ProductApprovalNumber { get; set; } public decimal ProductWeight { get; set; } public decimal ProductNec { get; set; } - public decimal ProductSellingPrice { get; set; } public string? ProductImage { get; set; } public string? ProductLink { get; set; } public int ProductMinimalQuantity { get; set; } diff --git a/PyroFetes/DTO/WareHouseProduct/Response/GetWareHouseProductDto.cs b/PyroFetes/DTO/WareHouseProduct/Response/GetWareHouseProductDto.cs index 2e66e62..70a1e4a 100644 --- a/PyroFetes/DTO/WareHouseProduct/Response/GetWareHouseProductDto.cs +++ b/PyroFetes/DTO/WareHouseProduct/Response/GetWareHouseProductDto.cs @@ -22,7 +22,6 @@ public class GetWareHouseProductDto public int ProductApprovalNumber { get; set; } public decimal ProductWeight { get; set; } public decimal ProductNec { get; set; } - public decimal ProductSellingPrice { get; set; } public string? ProductImage { get; set; } public string? ProductLink { get; set; } public int ProductMinimalQuantity { get; set; } From 8371423b16287b33781739f99bff76c89a818f20 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Fri, 10 Oct 2025 10:35:23 +0200 Subject: [PATCH 16/18] Editing Product.cs --- PyroFetes/Models/Product.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PyroFetes/Models/Product.cs b/PyroFetes/Models/Product.cs index b0f0d7f..f48ee46 100644 --- a/PyroFetes/Models/Product.cs +++ b/PyroFetes/Models/Product.cs @@ -5,14 +5,13 @@ namespace PyroFetes.Models public class Product { [Key] public int Id { get; set; } - [Required] public int References { get; set; } + [Required, MaxLength(20)] public string? Reference { get; set; } [Required, MaxLength(100)] public string? Name { get; set; } [Required] public decimal Duration {get; set;} [Required] public decimal Caliber { get; set; } [Required] public int ApprovalNumber { get; set; } [Required] public decimal Weight { get; set; } [Required] public decimal Nec { get; set; } - [Required] public decimal SellingPrice { get; set; } [Required] public string? Image { get; set; } [Required, MaxLength(200)] public string? Link { get; set; } [Required] public int MinimalQuantity { get; set; } From 014646d35c6fb8714b5d6d455f60adaee10d763a Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Fri, 10 Oct 2025 10:36:58 +0200 Subject: [PATCH 17/18] Migration --- PyroFetes/Migrations/PyroFetesDbContextModelSnapshot.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/PyroFetes/Migrations/PyroFetesDbContextModelSnapshot.cs b/PyroFetes/Migrations/PyroFetesDbContextModelSnapshot.cs index 1f414fb..27be969 100644 --- a/PyroFetes/Migrations/PyroFetesDbContextModelSnapshot.cs +++ b/PyroFetes/Migrations/PyroFetesDbContextModelSnapshot.cs @@ -541,11 +541,10 @@ namespace PyroFetes.Migrations b.Property("ProductCategoryId") .HasColumnType("int"); - b.Property("References") - .HasColumnType("int"); - - b.Property("SellingPrice") - .HasColumnType("decimal(18,2)"); + b.Property("Reference") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); b.Property("Weight") .HasColumnType("decimal(18,2)"); From 5a36c0ff2f2b7aec0726278fde4568dbd7ef369f Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Fri, 10 Oct 2025 10:37:13 +0200 Subject: [PATCH 18/18] Migration --- .../20251010083620_FixingDatabase.Designer.cs | 1950 +++++++++++++++++ .../20251010083620_FixingDatabase.cs | 52 + 2 files changed, 2002 insertions(+) create mode 100644 PyroFetes/Migrations/20251010083620_FixingDatabase.Designer.cs create mode 100644 PyroFetes/Migrations/20251010083620_FixingDatabase.cs diff --git a/PyroFetes/Migrations/20251010083620_FixingDatabase.Designer.cs b/PyroFetes/Migrations/20251010083620_FixingDatabase.Designer.cs new file mode 100644 index 0000000..7fcc4e0 --- /dev/null +++ b/PyroFetes/Migrations/20251010083620_FixingDatabase.Designer.cs @@ -0,0 +1,1950 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using PyroFetes; + +#nullable disable + +namespace PyroFetes.Migrations +{ + [DbContext(typeof(PyroFetesDbContext))] + [Migration("20251010083620_FixingDatabase")] + partial class FixingDatabase + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.20") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("PyroFetes.Models.Availability", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("AvailabilityDate") + .HasColumnType("date"); + + b.Property("DeliveryDate") + .HasColumnType("date"); + + b.Property("ExpirationDate") + .HasColumnType("date"); + + b.Property("RenewallDate") + .HasColumnType("date"); + + b.HasKey("Id"); + + b.ToTable("Availabilities"); + }); + + modelBuilder.Entity("PyroFetes.Models.Brand", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ProductId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ProductId"); + + b.ToTable("Brands"); + }); + + modelBuilder.Entity("PyroFetes.Models.City", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ZipCode") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("City"); + }); + + modelBuilder.Entity("PyroFetes.Models.Classification", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Label") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("Classifications"); + }); + + modelBuilder.Entity("PyroFetes.Models.Color", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Label") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("Colors"); + }); + + modelBuilder.Entity("PyroFetes.Models.Communication", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Calling") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ContactId") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Meeting") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("nvarchar(300)"); + + b.HasKey("Id"); + + b.HasIndex("ContactId"); + + b.ToTable("Communications"); + }); + + modelBuilder.Entity("PyroFetes.Models.Contact", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Address") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("CustomerId") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("PhoneNumber") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("Role") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ZipCode") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("CustomerId"); + + b.ToTable("Contacts"); + }); + + modelBuilder.Entity("PyroFetes.Models.ContactServiceProvider", b => + { + b.Property("ContactId") + .HasColumnType("int"); + + b.Property("ServiceProviderId") + .HasColumnType("int"); + + b.HasKey("ContactId", "ServiceProviderId"); + + b.HasIndex("ServiceProviderId"); + + b.ToTable("ContactServiceProvider"); + }); + + modelBuilder.Entity("PyroFetes.Models.Contract", b => + { + b.Property("ShowId") + .HasColumnType("int"); + + b.Property("ServiceProviderId") + .HasColumnType("int"); + + b.Property("TermsAndConditions") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("ShowId", "ServiceProviderId"); + + b.HasIndex("ServiceProviderId"); + + b.ToTable("Contract"); + }); + + modelBuilder.Entity("PyroFetes.Models.Customer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CustomerTypeId") + .HasColumnType("int"); + + b.Property("Note") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerTypeId"); + + b.ToTable("Customers"); + }); + + modelBuilder.Entity("PyroFetes.Models.CustomerType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Label") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("CustomerTypes"); + }); + + modelBuilder.Entity("PyroFetes.Models.Deliverer", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Transporter") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("Deliverers"); + }); + + modelBuilder.Entity("PyroFetes.Models.DeliveryNote", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DelivererId") + .HasColumnType("int"); + + b.Property("EstimateDeliveryDate") + .HasColumnType("date"); + + b.Property("ExpeditionDate") + .HasColumnType("date"); + + b.Property("RealDeliveryDate") + .HasColumnType("date"); + + b.Property("TrackingNumber") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.HasIndex("DelivererId"); + + b.ToTable("DeliveryNotes"); + }); + + modelBuilder.Entity("PyroFetes.Models.Effect", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Label") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.ToTable("Effects"); + }); + + modelBuilder.Entity("PyroFetes.Models.ExperienceLevel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Label") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("StaffId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("StaffId"); + + b.ToTable("ExperienceLevels"); + }); + + modelBuilder.Entity("PyroFetes.Models.HistoryOfApproval", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("DeliveryDate") + .HasColumnType("date"); + + b.Property("ExpirationDate") + .HasColumnType("date"); + + b.HasKey("Id"); + + b.ToTable("HistoryOfApprovals"); + }); + + modelBuilder.Entity("PyroFetes.Models.Material", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("WarehouseId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("WarehouseId"); + + b.ToTable("Materials"); + }); + + modelBuilder.Entity("PyroFetes.Models.MaterialWarehouse", b => + { + b.Property("MaterialId") + .HasColumnType("int"); + + b.Property("WarehouseId") + .HasColumnType("int"); + + b.HasKey("MaterialId", "WarehouseId"); + + b.HasIndex("WarehouseId"); + + b.ToTable("MaterialWarehouse"); + }); + + modelBuilder.Entity("PyroFetes.Models.Movement", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Arrival") + .HasColumnType("datetime2"); + + b.Property("Date") + .HasColumnType("datetime2"); + + b.Property("DestinationWarehouseId") + .HasColumnType("int"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.Property("SourceWarehouseId") + .HasColumnType("int"); + + b.Property("Start") + .HasColumnType("datetime2"); + + b.HasKey("Id"); + + b.HasIndex("DestinationWarehouseId"); + + b.HasIndex("SourceWarehouseId"); + + b.ToTable("Movements"); + }); + + modelBuilder.Entity("PyroFetes.Models.Price", b => + { + b.Property("ProductId") + .HasColumnType("int"); + + b.Property("SupplierId") + .HasColumnType("int"); + + b.Property("SellingPrice") + .HasColumnType("decimal(18,2)"); + + b.HasKey("ProductId", "SupplierId"); + + b.HasIndex("SupplierId"); + + b.ToTable("Prices"); + }); + + modelBuilder.Entity("PyroFetes.Models.Product", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ApprovalNumber") + .HasColumnType("int"); + + b.Property("Caliber") + .HasColumnType("decimal(18,2)"); + + b.Property("ClassificationId") + .HasColumnType("int"); + + b.Property("Duration") + .HasColumnType("decimal(18,2)"); + + b.Property("Image") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Link") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.Property("MinimalQuantity") + .HasColumnType("int"); + + b.Property("MovementId") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Nec") + .HasColumnType("decimal(18,2)"); + + b.Property("ProductCategoryId") + .HasColumnType("int"); + + b.Property("Reference") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("nvarchar(20)"); + + b.Property("Weight") + .HasColumnType("decimal(18,2)"); + + b.HasKey("Id"); + + b.HasIndex("ClassificationId"); + + b.HasIndex("MovementId"); + + b.HasIndex("ProductCategoryId"); + + b.ToTable("Products"); + }); + + modelBuilder.Entity("PyroFetes.Models.ProductCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Label") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("ProductCategories"); + }); + + modelBuilder.Entity("PyroFetes.Models.ProductColor", b => + { + b.Property("ProductId") + .HasColumnType("int"); + + b.Property("ColorId") + .HasColumnType("int"); + + b.HasKey("ProductId", "ColorId"); + + b.HasIndex("ColorId"); + + b.ToTable("ProductColors"); + }); + + modelBuilder.Entity("PyroFetes.Models.ProductDelivery", b => + { + b.Property("ProductId") + .HasColumnType("int"); + + b.Property("DeliveryNoteId") + .HasColumnType("int"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.HasKey("ProductId", "DeliveryNoteId"); + + b.HasIndex("DeliveryNoteId"); + + b.ToTable("ProductDeliveries"); + }); + + modelBuilder.Entity("PyroFetes.Models.ProductEffect", b => + { + b.Property("ProductId") + .HasColumnType("int"); + + b.Property("EffectId") + .HasColumnType("int"); + + b.HasKey("ProductId", "EffectId"); + + b.HasIndex("EffectId"); + + b.ToTable("ProductEffects"); + }); + + modelBuilder.Entity("PyroFetes.Models.ProductTimecode", b => + { + b.Property("ProductId") + .HasColumnType("int"); + + b.Property("ShowId") + .HasColumnType("int"); + + b.Property("End") + .HasColumnType("decimal(18,2)"); + + b.Property("Start") + .HasColumnType("decimal(18,2)"); + + b.HasKey("ProductId", "ShowId"); + + b.HasIndex("ShowId"); + + b.ToTable("ProductTimecode"); + }); + + modelBuilder.Entity("PyroFetes.Models.ProviderContact", b => + { + b.Property("ContactId") + .HasColumnType("int"); + + b.Property("ProviderId") + .HasColumnType("int"); + + b.HasKey("ContactId", "ProviderId"); + + b.HasIndex("ProviderId"); + + b.ToTable("ProviderContacts"); + }); + + modelBuilder.Entity("PyroFetes.Models.ProviderType", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Label") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("ProviderTypes"); + }); + + modelBuilder.Entity("PyroFetes.Models.PurchaseOrder", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("PurchaseConditions") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("nvarchar(300)"); + + b.HasKey("Id"); + + b.ToTable("PurchaseOrders"); + }); + + modelBuilder.Entity("PyroFetes.Models.PurchaseProduct", b => + { + b.Property("ProductId") + .HasColumnType("int"); + + b.Property("PurchaseOrderId") + .HasColumnType("int"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.HasKey("ProductId", "PurchaseOrderId"); + + b.HasIndex("PurchaseOrderId"); + + b.ToTable("PurchaseProducts"); + }); + + modelBuilder.Entity("PyroFetes.Models.Quotation", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ConditionsSale") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("nvarchar(300)"); + + b.Property("CustomerId") + .HasColumnType("int"); + + b.Property("Message") + .IsRequired() + .HasMaxLength(200) + .HasColumnType("nvarchar(200)"); + + b.HasKey("Id"); + + b.HasIndex("CustomerId"); + + b.ToTable("Quotations"); + }); + + modelBuilder.Entity("PyroFetes.Models.QuotationProduct", b => + { + b.Property("ProductId") + .HasColumnType("int"); + + b.Property("QuotationId") + .HasColumnType("int"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.HasKey("ProductId", "QuotationId"); + + b.HasIndex("QuotationId"); + + b.ToTable("QuotationProducts"); + }); + + modelBuilder.Entity("PyroFetes.Models.ServiceProvider", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Price") + .HasColumnType("decimal(18,2)"); + + b.Property("ProviderTypeId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ProviderTypeId"); + + b.ToTable("Providers"); + }); + + modelBuilder.Entity("PyroFetes.Models.Setting", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("ElectronicSignature") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.Property("Logo") + .IsRequired() + .HasColumnType("nvarchar(max)"); + + b.HasKey("Id"); + + b.ToTable("Settings"); + }); + + modelBuilder.Entity("PyroFetes.Models.Show", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("CityId") + .HasColumnType("int"); + + b.Property("Date") + .HasColumnType("date"); + + b.Property("Description") + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Place") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("nvarchar(120)"); + + b.Property("PyrotechnicImplementationPlan") + .IsRequired() + .HasMaxLength(500) + .HasColumnType("nvarchar(500)"); + + b.HasKey("Id"); + + b.HasIndex("CityId"); + + b.ToTable("Shows"); + }); + + modelBuilder.Entity("PyroFetes.Models.ShowMaterial", b => + { + b.Property("ShowId") + .HasColumnType("int"); + + b.Property("MaterialId") + .HasColumnType("int"); + + b.HasKey("ShowId", "MaterialId"); + + b.HasIndex("MaterialId"); + + b.ToTable("ShowMaterial"); + }); + + modelBuilder.Entity("PyroFetes.Models.ShowStaff", b => + { + b.Property("StaffId") + .HasColumnType("int"); + + b.Property("ShowId") + .HasColumnType("int"); + + b.HasKey("StaffId", "ShowId"); + + b.HasIndex("ShowId"); + + b.ToTable("ShowStaff"); + }); + + modelBuilder.Entity("PyroFetes.Models.ShowTruck", b => + { + b.Property("ShowId") + .HasColumnType("int"); + + b.Property("TruckId") + .HasColumnType("int"); + + b.HasKey("ShowId", "TruckId"); + + b.HasIndex("TruckId"); + + b.ToTable("ShowTruck"); + }); + + modelBuilder.Entity("PyroFetes.Models.Sound", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Artist") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("nvarchar(120)"); + + b.Property("CreationDate") + .HasColumnType("datetime2"); + + b.Property("Duration") + .IsRequired() + .HasColumnType("int"); + + b.Property("Format") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)"); + + b.Property("Kind") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("nvarchar(120)"); + + b.Property("SoundCategoryId") + .HasColumnType("int"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(60) + .HasColumnType("nvarchar(60)"); + + b.HasKey("Id"); + + b.HasIndex("SoundCategoryId"); + + b.ToTable("Sounds"); + }); + + modelBuilder.Entity("PyroFetes.Models.SoundCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("SoundCategories"); + }); + + modelBuilder.Entity("PyroFetes.Models.SoundTimecode", b => + { + b.Property("ShowId") + .HasColumnType("int"); + + b.Property("SoundId") + .HasColumnType("int"); + + b.Property("End") + .HasColumnType("decimal(18,2)"); + + b.Property("Start") + .HasColumnType("decimal(18,2)"); + + b.HasKey("ShowId", "SoundId"); + + b.HasIndex("SoundId"); + + b.ToTable("SoundTimecodes"); + }); + + modelBuilder.Entity("PyroFetes.Models.Staff", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Email") + .IsRequired() + .HasMaxLength(120) + .HasColumnType("nvarchar(120)"); + + b.Property("F4T2ExpirationDate") + .HasColumnType("date"); + + b.Property("F4T2NumberApproval") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("FirstName") + .IsRequired() + .HasMaxLength(60) + .HasColumnType("nvarchar(60)"); + + b.Property("LastName") + .IsRequired() + .HasMaxLength(60) + .HasColumnType("nvarchar(60)"); + + b.Property("Profession") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("Staffs"); + }); + + modelBuilder.Entity("PyroFetes.Models.StaffAvailability", b => + { + b.Property("AvailabilityId") + .HasColumnType("int"); + + b.Property("StaffId") + .HasColumnType("int"); + + b.HasKey("AvailabilityId", "StaffId"); + + b.HasIndex("StaffId"); + + b.ToTable("StaffAvailabilities"); + }); + + modelBuilder.Entity("PyroFetes.Models.StaffContact", b => + { + b.Property("ContactId") + .HasColumnType("int"); + + b.Property("StaffId") + .HasColumnType("int"); + + b.HasKey("ContactId", "StaffId"); + + b.HasIndex("StaffId"); + + b.ToTable("StaffContacts"); + }); + + modelBuilder.Entity("PyroFetes.Models.StaffHistoryOfApproval", b => + { + b.Property("HistoryOfApprovalId") + .HasColumnType("int"); + + b.Property("StaffId") + .HasColumnType("int"); + + b.HasKey("HistoryOfApprovalId", "StaffId"); + + b.HasIndex("StaffId"); + + b.ToTable("StaffHistoryOfApprovals"); + }); + + modelBuilder.Entity("PyroFetes.Models.Supplier", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Address") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("DeliveryDelay") + .HasColumnType("int"); + + b.Property("Email") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Phone") + .IsRequired() + .HasMaxLength(30) + .HasColumnType("nvarchar(30)"); + + b.Property("ZipCode") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Suppliers"); + }); + + modelBuilder.Entity("PyroFetes.Models.Truck", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("MaxExplosiveCapacity") + .IsRequired() + .HasColumnType("float"); + + b.Property("Sizes") + .IsRequired() + .HasMaxLength(80) + .HasColumnType("nvarchar(80)"); + + b.Property("Status") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(40) + .HasColumnType("nvarchar(40)"); + + b.HasKey("Id"); + + b.ToTable("Trucks"); + }); + + modelBuilder.Entity("PyroFetes.Models.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Email") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Fonction") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Password") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Salt") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.HasKey("Id"); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("PyroFetes.Models.Warehouse", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id")); + + b.Property("Address") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("City") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("Current") + .HasColumnType("int"); + + b.Property("MaxWeight") + .HasColumnType("int"); + + b.Property("MinWeight") + .HasColumnType("int"); + + b.Property("Name") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("nvarchar(100)"); + + b.Property("ZipCode") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Warehouses"); + }); + + modelBuilder.Entity("PyroFetes.Models.WarehouseProduct", b => + { + b.Property("ProductId") + .HasColumnType("int"); + + b.Property("WarehouseId") + .HasColumnType("int"); + + b.Property("Quantity") + .HasColumnType("int"); + + b.HasKey("ProductId", "WarehouseId"); + + b.HasIndex("WarehouseId"); + + b.ToTable("WarehouseProducts"); + }); + + modelBuilder.Entity("PyroFetes.Models.Brand", b => + { + b.HasOne("PyroFetes.Models.Product", "Product") + .WithMany("Brands") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("PyroFetes.Models.Communication", b => + { + b.HasOne("PyroFetes.Models.Contact", "Contact") + .WithMany("Communications") + .HasForeignKey("ContactId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Contact"); + }); + + modelBuilder.Entity("PyroFetes.Models.Contact", b => + { + b.HasOne("PyroFetes.Models.Customer", "Customer") + .WithMany("Contacts") + .HasForeignKey("CustomerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Customer"); + }); + + modelBuilder.Entity("PyroFetes.Models.ContactServiceProvider", b => + { + b.HasOne("PyroFetes.Models.Contact", "Contact") + .WithMany("ContactServiceProviders") + .HasForeignKey("ContactId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.ServiceProvider", "ServiceProvider") + .WithMany("ContactServiceProviders") + .HasForeignKey("ServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Contact"); + + b.Navigation("ServiceProvider"); + }); + + modelBuilder.Entity("PyroFetes.Models.Contract", b => + { + b.HasOne("PyroFetes.Models.ServiceProvider", "ServiceProvider") + .WithMany("Contracts") + .HasForeignKey("ServiceProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Show", "Show") + .WithMany("Contracts") + .HasForeignKey("ShowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ServiceProvider"); + + b.Navigation("Show"); + }); + + modelBuilder.Entity("PyroFetes.Models.Customer", b => + { + b.HasOne("PyroFetes.Models.CustomerType", "CustomerType") + .WithMany("Customers") + .HasForeignKey("CustomerTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("CustomerType"); + }); + + modelBuilder.Entity("PyroFetes.Models.DeliveryNote", b => + { + b.HasOne("PyroFetes.Models.Deliverer", "Deliverer") + .WithMany("DeliveryNotes") + .HasForeignKey("DelivererId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Deliverer"); + }); + + modelBuilder.Entity("PyroFetes.Models.ExperienceLevel", b => + { + b.HasOne("PyroFetes.Models.Staff", "Staff") + .WithMany("ExperienceLevels") + .HasForeignKey("StaffId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Staff"); + }); + + modelBuilder.Entity("PyroFetes.Models.Material", b => + { + b.HasOne("PyroFetes.Models.Warehouse", "Warehouse") + .WithMany() + .HasForeignKey("WarehouseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Warehouse"); + }); + + modelBuilder.Entity("PyroFetes.Models.MaterialWarehouse", b => + { + b.HasOne("PyroFetes.Models.Material", "Material") + .WithMany("MaterialWarehouses") + .HasForeignKey("MaterialId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Warehouse", "Warehouse") + .WithMany("MaterialWarehouses") + .HasForeignKey("WarehouseId") + .OnDelete(DeleteBehavior.Restrict) + .IsRequired(); + + b.Navigation("Material"); + + b.Navigation("Warehouse"); + }); + + modelBuilder.Entity("PyroFetes.Models.Movement", b => + { + b.HasOne("PyroFetes.Models.Warehouse", "DestinationWarehouse") + .WithMany("MovementsDestination") + .HasForeignKey("DestinationWarehouseId") + .OnDelete(DeleteBehavior.Restrict); + + b.HasOne("PyroFetes.Models.Warehouse", "SourceWarehouse") + .WithMany("MovementsSource") + .HasForeignKey("SourceWarehouseId") + .OnDelete(DeleteBehavior.Restrict); + + b.Navigation("DestinationWarehouse"); + + b.Navigation("SourceWarehouse"); + }); + + modelBuilder.Entity("PyroFetes.Models.Price", b => + { + b.HasOne("PyroFetes.Models.Product", "Product") + .WithMany("Prices") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Supplier", "Supplier") + .WithMany("Prices") + .HasForeignKey("SupplierId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("Supplier"); + }); + + modelBuilder.Entity("PyroFetes.Models.Product", b => + { + b.HasOne("PyroFetes.Models.Classification", "Classification") + .WithMany("Products") + .HasForeignKey("ClassificationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Movement", "Movement") + .WithMany("Products") + .HasForeignKey("MovementId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.ProductCategory", "ProductCategory") + .WithMany("Products") + .HasForeignKey("ProductCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Classification"); + + b.Navigation("Movement"); + + b.Navigation("ProductCategory"); + }); + + modelBuilder.Entity("PyroFetes.Models.ProductColor", b => + { + b.HasOne("PyroFetes.Models.Color", "Color") + .WithMany("ProductColors") + .HasForeignKey("ColorId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Product", "Product") + .WithMany("ProductColors") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Color"); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("PyroFetes.Models.ProductDelivery", b => + { + b.HasOne("PyroFetes.Models.DeliveryNote", "DeliveryNote") + .WithMany("ProductDeliveries") + .HasForeignKey("DeliveryNoteId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Product", "Product") + .WithMany("ProductDeliveries") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("DeliveryNote"); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("PyroFetes.Models.ProductEffect", b => + { + b.HasOne("PyroFetes.Models.Effect", "Effect") + .WithMany("ProductEffects") + .HasForeignKey("EffectId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Product", "Product") + .WithMany("ProductEffects") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Effect"); + + b.Navigation("Product"); + }); + + modelBuilder.Entity("PyroFetes.Models.ProductTimecode", b => + { + b.HasOne("PyroFetes.Models.Product", "Product") + .WithMany("ProductTimecodes") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Show", "Show") + .WithMany("ProductTimecodes") + .HasForeignKey("ShowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("Show"); + }); + + modelBuilder.Entity("PyroFetes.Models.ProviderContact", b => + { + b.HasOne("PyroFetes.Models.Contact", "Contact") + .WithMany() + .HasForeignKey("ContactId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.ServiceProvider", "Provider") + .WithMany() + .HasForeignKey("ProviderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Contact"); + + b.Navigation("Provider"); + }); + + modelBuilder.Entity("PyroFetes.Models.PurchaseProduct", b => + { + b.HasOne("PyroFetes.Models.Product", "Product") + .WithMany("PurchaseProducts") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.PurchaseOrder", "PurchaseOrder") + .WithMany("PurchaseProducts") + .HasForeignKey("PurchaseOrderId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("PurchaseOrder"); + }); + + modelBuilder.Entity("PyroFetes.Models.Quotation", b => + { + b.HasOne("PyroFetes.Models.Customer", "Customer") + .WithMany("Quotations") + .HasForeignKey("CustomerId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Customer"); + }); + + modelBuilder.Entity("PyroFetes.Models.QuotationProduct", b => + { + b.HasOne("PyroFetes.Models.Product", "Product") + .WithMany("QuotationProducts") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Quotation", "Quotation") + .WithMany("QuotationProducts") + .HasForeignKey("QuotationId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("Quotation"); + }); + + modelBuilder.Entity("PyroFetes.Models.ServiceProvider", b => + { + b.HasOne("PyroFetes.Models.ProviderType", "ProviderType") + .WithMany("ServiceProviders") + .HasForeignKey("ProviderTypeId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("ProviderType"); + }); + + modelBuilder.Entity("PyroFetes.Models.Show", b => + { + b.HasOne("PyroFetes.Models.City", "City") + .WithMany("Shows") + .HasForeignKey("CityId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("City"); + }); + + modelBuilder.Entity("PyroFetes.Models.ShowMaterial", b => + { + b.HasOne("PyroFetes.Models.Material", "Material") + .WithMany("ShowMaterials") + .HasForeignKey("MaterialId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Show", "Show") + .WithMany("ShowMaterials") + .HasForeignKey("ShowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Material"); + + b.Navigation("Show"); + }); + + modelBuilder.Entity("PyroFetes.Models.ShowStaff", b => + { + b.HasOne("PyroFetes.Models.Show", "Show") + .WithMany("ShowStaffs") + .HasForeignKey("ShowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Staff", "Staff") + .WithMany("ShowStaffs") + .HasForeignKey("StaffId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Show"); + + b.Navigation("Staff"); + }); + + modelBuilder.Entity("PyroFetes.Models.ShowTruck", b => + { + b.HasOne("PyroFetes.Models.Show", "Show") + .WithMany("ShowTrucks") + .HasForeignKey("ShowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Truck", "Truck") + .WithMany("ShowTrucks") + .HasForeignKey("TruckId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Show"); + + b.Navigation("Truck"); + }); + + modelBuilder.Entity("PyroFetes.Models.Sound", b => + { + b.HasOne("PyroFetes.Models.SoundCategory", "SoundCategory") + .WithMany("Sounds") + .HasForeignKey("SoundCategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("SoundCategory"); + }); + + modelBuilder.Entity("PyroFetes.Models.SoundTimecode", b => + { + b.HasOne("PyroFetes.Models.Show", "Show") + .WithMany("SoundTimecodes") + .HasForeignKey("ShowId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Sound", "Sound") + .WithMany("SoundTimecodes") + .HasForeignKey("SoundId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Show"); + + b.Navigation("Sound"); + }); + + modelBuilder.Entity("PyroFetes.Models.StaffAvailability", b => + { + b.HasOne("PyroFetes.Models.Availability", "Availability") + .WithMany("StaffAvailabilities") + .HasForeignKey("AvailabilityId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Staff", "Staff") + .WithMany("StaffAvailabilities") + .HasForeignKey("StaffId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Availability"); + + b.Navigation("Staff"); + }); + + modelBuilder.Entity("PyroFetes.Models.StaffContact", b => + { + b.HasOne("PyroFetes.Models.Contact", "Contact") + .WithMany("StaffContacts") + .HasForeignKey("ContactId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Staff", "Staff") + .WithMany("StaffContacts") + .HasForeignKey("StaffId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Contact"); + + b.Navigation("Staff"); + }); + + modelBuilder.Entity("PyroFetes.Models.StaffHistoryOfApproval", b => + { + b.HasOne("PyroFetes.Models.HistoryOfApproval", "HistoryOfApproval") + .WithMany("StaffHistoryOfApprovals") + .HasForeignKey("HistoryOfApprovalId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Staff", "Staff") + .WithMany("StaffHistoryOfApprovals") + .HasForeignKey("StaffId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("HistoryOfApproval"); + + b.Navigation("Staff"); + }); + + modelBuilder.Entity("PyroFetes.Models.WarehouseProduct", b => + { + b.HasOne("PyroFetes.Models.Product", "Product") + .WithMany("WarehouseProducts") + .HasForeignKey("ProductId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("PyroFetes.Models.Warehouse", "Warehouse") + .WithMany("WarehouseProducts") + .HasForeignKey("WarehouseId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Product"); + + b.Navigation("Warehouse"); + }); + + modelBuilder.Entity("PyroFetes.Models.Availability", b => + { + b.Navigation("StaffAvailabilities"); + }); + + modelBuilder.Entity("PyroFetes.Models.City", b => + { + b.Navigation("Shows"); + }); + + modelBuilder.Entity("PyroFetes.Models.Classification", b => + { + b.Navigation("Products"); + }); + + modelBuilder.Entity("PyroFetes.Models.Color", b => + { + b.Navigation("ProductColors"); + }); + + modelBuilder.Entity("PyroFetes.Models.Contact", b => + { + b.Navigation("Communications"); + + b.Navigation("ContactServiceProviders"); + + b.Navigation("StaffContacts"); + }); + + modelBuilder.Entity("PyroFetes.Models.Customer", b => + { + b.Navigation("Contacts"); + + b.Navigation("Quotations"); + }); + + modelBuilder.Entity("PyroFetes.Models.CustomerType", b => + { + b.Navigation("Customers"); + }); + + modelBuilder.Entity("PyroFetes.Models.Deliverer", b => + { + b.Navigation("DeliveryNotes"); + }); + + modelBuilder.Entity("PyroFetes.Models.DeliveryNote", b => + { + b.Navigation("ProductDeliveries"); + }); + + modelBuilder.Entity("PyroFetes.Models.Effect", b => + { + b.Navigation("ProductEffects"); + }); + + modelBuilder.Entity("PyroFetes.Models.HistoryOfApproval", b => + { + b.Navigation("StaffHistoryOfApprovals"); + }); + + modelBuilder.Entity("PyroFetes.Models.Material", b => + { + b.Navigation("MaterialWarehouses"); + + b.Navigation("ShowMaterials"); + }); + + modelBuilder.Entity("PyroFetes.Models.Movement", b => + { + b.Navigation("Products"); + }); + + modelBuilder.Entity("PyroFetes.Models.Product", b => + { + b.Navigation("Brands"); + + b.Navigation("Prices"); + + b.Navigation("ProductColors"); + + b.Navigation("ProductDeliveries"); + + b.Navigation("ProductEffects"); + + b.Navigation("ProductTimecodes"); + + b.Navigation("PurchaseProducts"); + + b.Navigation("QuotationProducts"); + + b.Navigation("WarehouseProducts"); + }); + + modelBuilder.Entity("PyroFetes.Models.ProductCategory", b => + { + b.Navigation("Products"); + }); + + modelBuilder.Entity("PyroFetes.Models.ProviderType", b => + { + b.Navigation("ServiceProviders"); + }); + + modelBuilder.Entity("PyroFetes.Models.PurchaseOrder", b => + { + b.Navigation("PurchaseProducts"); + }); + + modelBuilder.Entity("PyroFetes.Models.Quotation", b => + { + b.Navigation("QuotationProducts"); + }); + + modelBuilder.Entity("PyroFetes.Models.ServiceProvider", b => + { + b.Navigation("ContactServiceProviders"); + + b.Navigation("Contracts"); + }); + + modelBuilder.Entity("PyroFetes.Models.Show", b => + { + b.Navigation("Contracts"); + + b.Navigation("ProductTimecodes"); + + b.Navigation("ShowMaterials"); + + b.Navigation("ShowStaffs"); + + b.Navigation("ShowTrucks"); + + b.Navigation("SoundTimecodes"); + }); + + modelBuilder.Entity("PyroFetes.Models.Sound", b => + { + b.Navigation("SoundTimecodes"); + }); + + modelBuilder.Entity("PyroFetes.Models.SoundCategory", b => + { + b.Navigation("Sounds"); + }); + + modelBuilder.Entity("PyroFetes.Models.Staff", b => + { + b.Navigation("ExperienceLevels"); + + b.Navigation("ShowStaffs"); + + b.Navigation("StaffAvailabilities"); + + b.Navigation("StaffContacts"); + + b.Navigation("StaffHistoryOfApprovals"); + }); + + modelBuilder.Entity("PyroFetes.Models.Supplier", b => + { + b.Navigation("Prices"); + }); + + modelBuilder.Entity("PyroFetes.Models.Truck", b => + { + b.Navigation("ShowTrucks"); + }); + + modelBuilder.Entity("PyroFetes.Models.Warehouse", b => + { + b.Navigation("MaterialWarehouses"); + + b.Navigation("MovementsDestination"); + + b.Navigation("MovementsSource"); + + b.Navigation("WarehouseProducts"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/PyroFetes/Migrations/20251010083620_FixingDatabase.cs b/PyroFetes/Migrations/20251010083620_FixingDatabase.cs new file mode 100644 index 0000000..1073d64 --- /dev/null +++ b/PyroFetes/Migrations/20251010083620_FixingDatabase.cs @@ -0,0 +1,52 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace PyroFetes.Migrations +{ + /// + public partial class FixingDatabase : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "References", + table: "Products"); + + migrationBuilder.DropColumn( + name: "SellingPrice", + table: "Products"); + + migrationBuilder.AddColumn( + name: "Reference", + table: "Products", + type: "nvarchar(20)", + maxLength: 20, + nullable: false, + defaultValue: ""); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "Reference", + table: "Products"); + + migrationBuilder.AddColumn( + name: "References", + table: "Products", + type: "int", + nullable: false, + defaultValue: 0); + + migrationBuilder.AddColumn( + name: "SellingPrice", + table: "Products", + type: "decimal(18,2)", + nullable: false, + defaultValue: 0m); + } + } +}