From 4d3eafc7e79248beff8f54ca786e25babd180a3a Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Fri, 19 May 2023 16:01:53 +0200 Subject: [PATCH] Aggiunta DTO Preliminari --- WebDoorCreator.Data/DTO/CostingDTO.cs | 21 ++++++++ WebDoorCreator.Data/DTO/CustomerDTO.cs | 59 ++++++++++++++++++++++ WebDoorCreator.Data/DTO/DoorCostingDTO.cs | 25 +++++++++ WebDoorCreator.Data/DTO/OrderDetailsDTO.cs | 40 +++++++++++++++ 4 files changed, 145 insertions(+) create mode 100644 WebDoorCreator.Data/DTO/CostingDTO.cs create mode 100644 WebDoorCreator.Data/DTO/CustomerDTO.cs create mode 100644 WebDoorCreator.Data/DTO/DoorCostingDTO.cs create mode 100644 WebDoorCreator.Data/DTO/OrderDetailsDTO.cs diff --git a/WebDoorCreator.Data/DTO/CostingDTO.cs b/WebDoorCreator.Data/DTO/CostingDTO.cs new file mode 100644 index 0000000..bce2d82 --- /dev/null +++ b/WebDoorCreator.Data/DTO/CostingDTO.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WebDoorCreator.Data.DTO +{ + public class CostingDTO + { + /// + /// Order's UID + /// + public int OrderId { get; set; } + + /// + /// Dictionary of evaluated unit cost for each Door in Order + /// + public Dictionary DoorUnitCost { get; set; } = new Dictionary(); + } +} diff --git a/WebDoorCreator.Data/DTO/CustomerDTO.cs b/WebDoorCreator.Data/DTO/CustomerDTO.cs new file mode 100644 index 0000000..9292117 --- /dev/null +++ b/WebDoorCreator.Data/DTO/CustomerDTO.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WebDoorCreator.Data.DTO +{ + /// + /// COmpany data DTO + /// + [Serializable] + public class CustomerDTO + { + public int CompanyId { get; set; } + + /// + /// Codice esterno x riferimento (es ERP) + /// + [MaxLength(250)] + public string CompanyExtCode { get; set; } = ""; + + /// + /// Nome / ragione Sociale + /// + [MaxLength(500)] + public string CompanyName { get; set; } = ""; + + /// + /// indirizzo + /// + [MaxLength(250)] + public string Address { get; set; } = ""; + + /// + /// CAP + /// + public int ZipCode { get; set; } = 0; + + /// + /// Citta + /// + [MaxLength(50)] + public string City { get; set; } = ""; + + /// + /// Stato + /// + [MaxLength(50)] + public string State { get; set; } = ""; + + /// + /// VAT / P.Iva + /// + [MaxLength(50)] + public string VAT { get; set; } = ""; + } +} diff --git a/WebDoorCreator.Data/DTO/DoorCostingDTO.cs b/WebDoorCreator.Data/DTO/DoorCostingDTO.cs new file mode 100644 index 0000000..d9b3475 --- /dev/null +++ b/WebDoorCreator.Data/DTO/DoorCostingDTO.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WebDoorCreator.Data.DTO +{ + /// + /// Serialized door data for cost evaluation + /// + [Serializable] + public class DoorCostingDTO + { + public int DoorId { get; set; } = 0; + + public double SizeX { get; set; } = 0; + public double SizeY { get; set; } = 0; + public double SizeZ { get; set; } = 0; + + public double EstimatedWorkTime { get; set; } = 0; + + public Dictionary BOMList { get; set; }= new Dictionary(); + } +} diff --git a/WebDoorCreator.Data/DTO/OrderDetailsDTO.cs b/WebDoorCreator.Data/DTO/OrderDetailsDTO.cs new file mode 100644 index 0000000..a9b463e --- /dev/null +++ b/WebDoorCreator.Data/DTO/OrderDetailsDTO.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WebDoorCreator.Data.DTO +{ + /// + /// Serialized order data + /// + [Serializable] + public class OrderDetailsDTO + { + /// + /// Order UID (DB) + /// + public int OrderId { get; set; } + + /// + /// Customer Info + /// + public CustomerDTO CustomerInfo { get; set; } = new CustomerDTO(); + + /// + /// Order reference / Ext code + /// + public string OrderExtCode { get; set; } = ""; + + /// + /// Order description + /// + public string OrderDescript { get; set; } = ""; + + /// + /// Door list for current order + /// + public List DoorsList { get; set; } = new List(); + } +}