Merge branch 'release/UpdateProdDemo-202230612-15'
This commit is contained in:
+69
-3
@@ -4,10 +4,31 @@ Di seguito l'elenco dei todo da completare
|
||||
|
||||
## Framework
|
||||
|
||||
Traduzione OVUNQUE x ogni termine/etichetta/button..
|
||||
Importante:
|
||||
- [ ] Traduzione OVUNQUE x ogni termine/etichetta/button..
|
||||
|
||||
## Modello dati
|
||||
|
||||
Da sistemare
|
||||
|
||||
- [x] Eliminazione dell'oggetto DoorType (navigazione, tab db)
|
||||
- [x] creare nuova migration + update DB x fix TypeDoor
|
||||
- [x] Verificare che le porte duplicate (da template o da stesso ordine) riportino in TypeId il cod porta originale e che le altre abbiano 1
|
||||
- [x] verificare eventualmente cambio nome campo TypeId --> DoorIdParent
|
||||
|
||||
## Pagine
|
||||
|
||||
### UIX generale
|
||||
|
||||
Verifiche generali
|
||||
|
||||
- [ ] pulsanti update(save)/cancel
|
||||
- [ ] omogenei (colore, icona, x forma cerchio/quadrato vediamo...)
|
||||
- [ ] valutazione omogeneità forma (cerchio/quadrato... normalizzare? al contrario differenziare?)
|
||||
- [ ] icone di update che siano omogenee
|
||||
- [ ] pulsanti operativi siano omogenei
|
||||
- [ ] selettori a tendina da omogeneizzare
|
||||
|
||||
### HOME page
|
||||
|
||||
... non saprei, forse link a
|
||||
@@ -26,6 +47,14 @@ Per completare
|
||||
- search generico
|
||||
- stato ordine
|
||||
- [x] ordinamento
|
||||
- [ ] aggiungere data promessa consegna: dato sul db, valore default (+30gg?), gestione filtro...
|
||||
- [ ] aggiungere calcolo (FAKE) dei prezzi
|
||||
- [ ] aggiungere company x ordini (x viste DCA almeno)
|
||||
- [ ] gestione modifica descrizione/codice ordini (da aprte del cliente finale)
|
||||
- [ ] aggiunta gestione DCA x conferma prezzi e tempistiche
|
||||
- [ ] aggiunta gestione DCA x approvazione ordini
|
||||
- [ ] verifica HW con Filippo/Emmanuele da info ABH/Kit
|
||||
- [ ] verificare significato della dicitura "Model Number": cosa indica esattamente? è corretta sul db? è calcolata correttametne da interfaccia?
|
||||
|
||||
### DCA Order Mans
|
||||
|
||||
@@ -39,6 +68,7 @@ Per completare:
|
||||
- [x] sistemare con paginatore max 3 righe x 4 porte
|
||||
- [x] fix button verde add-new
|
||||
- [x] ombreggiatura blocco
|
||||
- [ ] gestione calcolo prezzi (almeno fake)
|
||||
|
||||
### DoorDefinition BaseParams
|
||||
- [x] conteggio num modifiche da salvare
|
||||
@@ -58,15 +88,51 @@ Per completare:
|
||||
Sistemare:
|
||||
- [x] da implementare davvero lettura pdf (da cartella pdf di esempi)
|
||||
- [x] fix cancel/save: globale x Hardware oppure x ognuno con icona?
|
||||
- [ ] verificare perché NON si aggiorna al salvataggio pagina dei 18 hw
|
||||
- [x] verificare perché NON si aggiorna al salvataggio pagina dei 18 hw
|
||||
- [x] mancano il totale componenti x ogni hw attivato
|
||||
- [ ] aggiungere icone/immagini x gli HW da inserire nelle porte
|
||||
|
||||
|
||||
### Import componenti DOOR
|
||||
|
||||
Procedura per import componenti, sempre GLOBALE (= TUTTI)
|
||||
|
||||
- [x] definizione cartelle di base:
|
||||
- [x] (A) R:\WebDoor\CurComp x componenti ATTUALI/cottenti/approvati
|
||||
- [x] (B) R:\WebDoor\NewComp x componenti DA valutare x import
|
||||
- [x] scansione della cartella (B)
|
||||
- [x] ciclo x ogni file della cartella B
|
||||
- [x] rilevo path (assoluto e relativo = togliendo parte (B))
|
||||
- [x] calcolo MD5
|
||||
- [x] rilevo lenght
|
||||
- [x] rilevo last mod
|
||||
- [ ] cerco sul DB record x il PATH (RELATIVO) in oggetto (opzionalmente unique sul db)
|
||||
- [ ] salvo datetime = adesso
|
||||
- [ ] in base alla verifica precedente mi tengo set in memoria dalla lista del DB con
|
||||
- [ ] NON trovo record --> registro nuovo record, con stato = new (=1)
|
||||
- [ ] trovo record
|
||||
- [ ] SE cambia MD5/lenght/(last mod?) --> registro stato MOD (=2) + lastCheck = adesso
|
||||
- [ ] se NON cambia --> registro lastCheck = adesso + stato CONFIRM ( =0)
|
||||
- [ ] verifico TUTTI i record del DB, e quelli con lastCheck < adesso --> segno come ELIMINATI (=3)
|
||||
- [ ] step di check puntuale: TUTTI quelli con stato > 0 sono mostrati x azione (1 check x ogni riga, con seleziona tutti/nessuno)
|
||||
- [ ] l'utente deve poter VEDERE la differenza tra i file (modificati) di (A) e (B) (con diff tramite modale, ...)
|
||||
- [ ] l'utente checca 0/+ righe e clicca su CONFERMA: si cicla x TUTTE le righe checked x aggiornarle sul DB
|
||||
- [ ] le righe NUOVE confermate --> sono registrate (con valid from...), stato CONFIRM ( =0), viene copiato file/cartelle da (B) ad (A)
|
||||
- [ ] le righe modificate --> si registra modifica, stato CONFIRM ( =0), viene sovrascritto/sostituito file/cartelle da (B) ad (A)
|
||||
- [ ] le righe eliminate --> si imposta cancellazione logica (validUntil), stato DELETED ( =-1), viene sovrascritto/sostituito file/cartelle da (B) ad (A)
|
||||
- [ ] le righe NON checked, ma NON aggiorno sul DB:
|
||||
- [ ] se erano nuove (=1) --> elimino dal DB (e NON copio folder)
|
||||
- [ ] se erano modificate (=2) --> riporto a stato precedente (0/-1) (e NON copio)
|
||||
- [ ] se erano eliminate (=3) --> riporto a 0 (e NON faccio nulla)
|
||||
|
||||
|
||||
#### Report
|
||||
|
||||
- [x] Va inserita una lista dei componenti + elenco quote.
|
||||
- [ ] Va pensato esportabile in pdf, comprensivo di "check pdf fatto da tizio alle ..."
|
||||
- [x] Esportabile in pdf, comprensivo di "check pdf fatto da tizio alle ..."
|
||||
|
||||
## Componenti
|
||||
- [ ] costruire libreria componenti (ad esmepio waiter/loader) da siti di esempio componenti in EgwCoreLib.Razor
|
||||
|
||||
|
||||
### Top
|
||||
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>WebDoorCreator - Egalware</i>
|
||||
<h4>Version: 0.9.2305.2319</h4>
|
||||
<h4>Version: 0.9.2306.0915</h4>
|
||||
<br /> Release note:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.9.2305.2319
|
||||
0.9.2306.0915
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>0.9.2305.2319</version>
|
||||
<version>0.9.2306.0915</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/WDC/stable/WDC.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/WDC/stable/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
// See https://aka.ms/new-console-template for more information
|
||||
using System.Diagnostics;
|
||||
using System.Net.Security;
|
||||
using System.Text;
|
||||
|
||||
int lineCount = 0;
|
||||
//StringBuilder output = new StringBuilder();
|
||||
|
||||
|
||||
void OutputHandler(object sender, DataReceivedEventArgs e)
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace WebDoorCreator.API.Controllers
|
||||
}
|
||||
/// <summary>
|
||||
/// GET: api/Order/GetCurrent
|
||||
/// Recupera ordini degli ultimi 6 mesi dato cliente e stato
|
||||
/// Recupera ordini dato id cliente + stato ordini (limitato a ultimi 6 mesi)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("GetCurrent")]
|
||||
@@ -36,7 +36,7 @@ namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
List<int> answ = new List<int>();
|
||||
DateTime dtEnd = DateTime.Now;
|
||||
DateTime dtStart = dtEnd.AddMonths(-1);
|
||||
DateTime dtStart = dtEnd.AddMonths(-6);
|
||||
var rawData = await WDCService.OrderStatusGetFilt(id, ordStatus, dtStart, dtEnd);
|
||||
if (rawData != null)
|
||||
{
|
||||
@@ -49,8 +49,8 @@ namespace WebDoorCreator.API.Controllers
|
||||
/// </summary>
|
||||
/// <param name="OrderId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("OrderDetail")]
|
||||
public async Task<OrderDetailsDTO> OrderDetail(int OrderId)
|
||||
[HttpGet("GetDetail")]
|
||||
public async Task<OrderDetailsDTO> GetDetail(int OrderId)
|
||||
{
|
||||
OrderDetailsDTO answ = new OrderDetailsDTO()
|
||||
{
|
||||
@@ -58,19 +58,81 @@ namespace WebDoorCreator.API.Controllers
|
||||
};
|
||||
// recupero info ordine
|
||||
var rawOrder = await WDCService.OrderGetByKey(OrderId);
|
||||
if (rawOrder != null)
|
||||
if (rawOrder != null && rawOrder.CompanyNav != null)
|
||||
{
|
||||
answ.OrderDescript = rawOrder.OrderDescript;
|
||||
answ.OrderExtCode = rawOrder.OrderExtCode;
|
||||
// recupero info customer
|
||||
|
||||
// recupero info customer
|
||||
CustomerDTO customer = new CustomerDTO()
|
||||
{
|
||||
Address = rawOrder.CompanyNav.Address,
|
||||
City = rawOrder.CompanyNav.City,
|
||||
CompanyExtCode = rawOrder.CompanyNav.CompanyExtCode,
|
||||
CompanyId = rawOrder.CompanyNav.CompanyId,
|
||||
CompanyName = rawOrder.CompanyNav.CompanyName,
|
||||
State = rawOrder.CompanyNav.State,
|
||||
VAT = rawOrder.CompanyNav.VAT,
|
||||
ZipCode = rawOrder.CompanyNav.ZipCode
|
||||
};
|
||||
answ.CustomerInfo = customer;
|
||||
// recuper elenco porte...
|
||||
List<DoorCostingDTO> dcDTO = new List<DoorCostingDTO>();
|
||||
var doorsList = await WDCService.DoorGetByOrderId(OrderId);
|
||||
foreach (var door in doorsList)
|
||||
{
|
||||
// recupero i dato DoorOp
|
||||
var doorOpList = await WDCService.DoorOpGetByDoorId(door.DoorId);
|
||||
Dictionary<string, List<string>> currBOMList = new Dictionary<string, List<string>>();
|
||||
// ciclo su tutte le DoorOp
|
||||
foreach (var doorOp in doorOpList)
|
||||
{
|
||||
// cerco se ci sia già o meno nella BOM l'item corrente
|
||||
if (currBOMList.ContainsKey(doorOp.ObjectId))
|
||||
{
|
||||
currBOMList[doorOp.ObjectId].Add(doorOp.JsoncActVal);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<string> currOp = new List<string>();
|
||||
currOp.Add(doorOp.JsoncActVal);
|
||||
currBOMList.Add(doorOp.ObjectId, currOp);
|
||||
}
|
||||
}
|
||||
// creo oggetto DTO finale della porta
|
||||
var doorDto = new DoorCostingDTO()
|
||||
{
|
||||
DoorId = door.DoorId,
|
||||
Quantity = door.Quantity,
|
||||
EstimatedWorkTime = 0,
|
||||
BOMList = currBOMList
|
||||
};
|
||||
dcDTO.Add(doorDto);
|
||||
}
|
||||
//answ. = rawOrder.OrderDescript;
|
||||
answ.DoorsList = dcDTO;
|
||||
}
|
||||
// popolo con dati specifica...
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Door price update for order's cost evaluation
|
||||
/// </summary>
|
||||
/// <param name="EvalResults">list of DoorPriceDTO with UnitPrices</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("DoorPriceUpdate")]
|
||||
public async Task<string> DoorPriceUpdate(List<DoorPriceDTO> EvalResults)
|
||||
{
|
||||
string answ = "NA";
|
||||
var updateSet = EvalResults
|
||||
.Where(x => x.Valid)
|
||||
.ToDictionary(x => x.DoorId, x => x.UnitCost);
|
||||
bool fatto = await WDCService.DoorUpdateCosts(updateSet);
|
||||
answ = fatto ? "OK" : "NO";
|
||||
return answ;
|
||||
}
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
@@ -81,6 +81,19 @@ namespace WebDoorCreator.API.Controllers
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset della coda di processing x evitare condizioni di "stuck in calc"
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("ResetQueueProcessing")]
|
||||
public async Task<string> ResetQueueProcessing()
|
||||
{
|
||||
string answ = "NA";
|
||||
bool fatto = await QDataServ.ResetQueueProcessing();
|
||||
answ = fatto ? "OK" : "NO";
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invio elenco risultati elaborazioni (modalità boolean di esecuzione corretta)
|
||||
/// </summary>
|
||||
@@ -130,8 +143,6 @@ namespace WebDoorCreator.API.Controllers
|
||||
return actQueue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using Microsoft.Reporting.NETCore;
|
||||
using NLog;
|
||||
using System.Data;
|
||||
using ToDataTable;
|
||||
using WebDoorCreator.Core.ReportViewer;
|
||||
using WebDoorCreator.Data.Services;
|
||||
|
||||
namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class ReportController : ControllerBase
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public ReportController(IConfiguration configuration, WebDoorCreatorService DataService)
|
||||
{
|
||||
Log.Info("Starting ReportController");
|
||||
_configuration = configuration;
|
||||
WDCService = DataService;
|
||||
Log.Info("Avviato ReportController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
// GET: api/Alive
|
||||
[HttpGet]
|
||||
public string Get()
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce report dato ordine e formato
|
||||
/// </summary>
|
||||
/// <param name="OrderId">ID univoco ordine</param>
|
||||
/// <param name="Format">Formato: PDF/HTML/DOCX/XLSX</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("GetOrderReport")]
|
||||
public async Task<IActionResult> GetOrderReport(int OrderId, string Format)
|
||||
{
|
||||
// dato il servizio è impostato il file rdlc e la struttura data DS da passare
|
||||
await Task.Delay(1);
|
||||
// inizializzo parametri report di default
|
||||
Core.ReportViewer.Report.RenderParams currParams = new Core.ReportViewer.Report.RenderParams(Format);
|
||||
currParams.FileName= $"DCA-Order-{OrderId:00000000}";
|
||||
|
||||
// restituisco oggetto ReportOrder specifico
|
||||
return await OrderReportGet(OrderId, currParams);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private WebDoorCreatorService WDCService { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Restituisce filestream del report DEMO
|
||||
/// </summary>
|
||||
/// <param name="FileName">Nome file desiderato x download</param>
|
||||
/// <param name="RenderFormat"></param>
|
||||
/// <param name="FileExt"></param>
|
||||
/// <param name="MimeType"></param>
|
||||
/// <returns></returns>
|
||||
private IActionResult ReportDemoGet(int OrderId, Core.ReportViewer.Report.RenderParams CurrParams)
|
||||
{
|
||||
using (var report = new LocalReport())
|
||||
{
|
||||
// setup parametri
|
||||
List<ReportParameter> RepParams = new List<ReportParameter>();
|
||||
RepParams.Add(new ReportParameter("Title", "Invoice 4/2020"));
|
||||
// setup DsReport
|
||||
Dictionary<string, DataTable> DsDict = new Dictionary<string, DataTable>();
|
||||
Random rnd = new Random();
|
||||
decimal WidgetPrice = 204.99m;
|
||||
decimal GizmoPrice = 2.41m;
|
||||
var items = new[] {
|
||||
new ReportItem { Description = "Widget 6000", Price = WidgetPrice, Qty = rnd.Next(1,5) },
|
||||
new ReportItem { Description = "Gizmo MAX", Price = GizmoPrice, Qty = rnd.Next(10,50) },
|
||||
new ReportItem { Description = "Pippo", Price = 1.2m, Qty = rnd.Next(3,9) },
|
||||
new ReportItem { Description = "Paperino", Price = 1.74m, Qty = rnd.Next(5,15) }
|
||||
}.ToList();
|
||||
var totaQty = items.Sum(x => x.Qty);
|
||||
var avgPrice = items.Sum(x => x.Qty * x.Price) / totaQty;
|
||||
items.Add(new ReportItem() { Description = "Total", Qty = totaQty, Price = Math.Round(avgPrice, 2) });
|
||||
|
||||
DataTable tabDati = items.ToDataTable();
|
||||
tabDati.TableName = "Items";
|
||||
// aggiungo dizionario
|
||||
DsDict.Add("Items", tabDati);
|
||||
|
||||
// carico dati nel report...
|
||||
Core.ReportViewer.Report.Load(report, "Report.rdlc", RepParams, DsDict);
|
||||
var rawData = report.Render(CurrParams.RenderFormat);
|
||||
return File(rawData, CurrParams.MimeType, $"{CurrParams.FileName}.{CurrParams.Extension}");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/// <summary>
|
||||
/// Restituisce filestream del report richiesto
|
||||
/// </summary>
|
||||
/// <param name="OrderId">ID Ordine</param>
|
||||
/// <param name="CurrParams">Parametri rendering report</param>
|
||||
/// <returns></returns>
|
||||
private async Task<IActionResult> OrderReportGet(int OrderId, Core.ReportViewer.Report.RenderParams CurrParams)
|
||||
{
|
||||
using (var report = new LocalReport())
|
||||
{
|
||||
// setup parametri
|
||||
List<ReportParameter> RepParams = new List<ReportParameter>();
|
||||
RepParams.Add(new ReportParameter("OrderID", $"{OrderId}"));
|
||||
// setup DsReport
|
||||
Dictionary<string, DataTable> DsDict = new Dictionary<string, DataTable>();
|
||||
// recupero tab dati config...
|
||||
var confList = await WDCService.ConfigGetAll();
|
||||
DataTable tabDatiConf = confList.ToDataTable();
|
||||
tabDatiConf.TableName = "DataSetConfig";
|
||||
// aggiungo a dizionario
|
||||
DsDict.Add("DataSetConfig", tabDatiConf);
|
||||
|
||||
// recupero dati veri del report...
|
||||
var repDetailData = await WDCService.PreRepOrderGetByKey(OrderId);
|
||||
DataTable tabDati = repDetailData.ToDataTable();
|
||||
tabDati.TableName = "DataSetOrderReportExpl";
|
||||
// aggiungo dizionario
|
||||
DsDict.Add("DataSetOrderReportExpl", tabDati);
|
||||
|
||||
// carico dati nel report...
|
||||
Core.ReportViewer.Report.Load(report, "ReportOrder.rdlc", RepParams, DsDict);
|
||||
var rawData = report.Render(CurrParams.RenderFormat);
|
||||
return File(rawData, CurrParams.MimeType, $"{CurrParams.FileName}.{CurrParams.Extension}");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,447 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<DataSources>
|
||||
<DataSource Name="LocalSource">
|
||||
<ConnectionProperties>
|
||||
<DataProvider>System.Data.DataSet</DataProvider>
|
||||
<ConnectString>/* Local Connection */</ConnectString>
|
||||
</ConnectionProperties>
|
||||
<rd:DataSourceID>bd60bef3-b3d9-477e-9052-ab58c6f1ec86</rd:DataSourceID>
|
||||
</DataSource>
|
||||
</DataSources>
|
||||
<DataSets>
|
||||
<DataSet Name="Items">
|
||||
<Query>
|
||||
<DataSourceName>LocalSource</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="Description">
|
||||
<DataField>Description</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Price">
|
||||
<DataField>Price</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Qty">
|
||||
<DataField>Qty</DataField>
|
||||
<rd:TypeName>System.Int32</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Total">
|
||||
<DataField>Total</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>LocalSource</rd:DataSetName>
|
||||
<rd:TableName>Items</rd:TableName>
|
||||
<rd:ObjectDataSourceType>ReportViewerCore.ReportItem</rd:ObjectDataSourceType>
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
<ReportSections>
|
||||
<ReportSection>
|
||||
<Body>
|
||||
<ReportItems>
|
||||
<Tablix Name="Tablix1">
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>8.31785cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.67938cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Description</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox3">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Price</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox5">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Qty</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox2">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Total</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.67938cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Description">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Description.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Description</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Price">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Price.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Price</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Qty">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Qty.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Qty</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Total">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Total.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Total</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
</TablixRows>
|
||||
</TablixBody>
|
||||
<TablixColumnHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember>
|
||||
<KeepWithGroup>After</KeepWithGroup>
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<Group Name="Details" />
|
||||
</TablixMember>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>Items</DataSetName>
|
||||
<Top>2.85433cm</Top>
|
||||
<Left>0.3175cm</Left>
|
||||
<Height>1.35875cm</Height>
|
||||
<Width>15.875cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Tablix>
|
||||
<Textbox Name="Textbox6">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Title.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontSize>26pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||
<Top>0.26141cm</Top>
|
||||
<Left>0.3175cm</Left>
|
||||
<Height>1.79062cm</Height>
|
||||
<Width>15.875cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>2in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>6.5in</Width>
|
||||
<Page>
|
||||
<PageHeight>29.7cm</PageHeight>
|
||||
<PageWidth>21cm</PageWidth>
|
||||
<LeftMargin>2cm</LeftMargin>
|
||||
<RightMargin>2cm</RightMargin>
|
||||
<TopMargin>2cm</TopMargin>
|
||||
<BottomMargin>2cm</BottomMargin>
|
||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
||||
<Style />
|
||||
</Page>
|
||||
</ReportSection>
|
||||
</ReportSections>
|
||||
<ReportParameters>
|
||||
<ReportParameter Name="Title">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<ReportParametersLayout>
|
||||
<GridLayoutDefinition>
|
||||
<NumberOfColumns>4</NumberOfColumns>
|
||||
<NumberOfRows>2</NumberOfRows>
|
||||
<CellDefinitions>
|
||||
<CellDefinition>
|
||||
<ColumnIndex>0</ColumnIndex>
|
||||
<RowIndex>0</RowIndex>
|
||||
<ParameterName>Title</ParameterName>
|
||||
</CellDefinition>
|
||||
</CellDefinitions>
|
||||
</GridLayoutDefinition>
|
||||
</ReportParametersLayout>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>156b21d2-9542-4902-99ef-7ec823774bb2</rd:ReportID>
|
||||
</Report>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -32,6 +32,15 @@
|
||||
<ProjectReference Include="..\WebDoorCreator.Core\WebDoorCreator.Core.csproj" />
|
||||
<ProjectReference Include="..\WebDoorCreator.Data\WebDoorCreator.Data.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Reports\Report.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Reports\ReportOrder.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
|
||||
</Target>
|
||||
|
||||
@@ -26,5 +26,8 @@
|
||||
"Admin": "samuele@steamware.net",
|
||||
"ProjCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com",
|
||||
"TimbCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com"
|
||||
},
|
||||
"RuntimeOpt": {
|
||||
"VetoRemoveProcessing": 5
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebDoorCreator.CamSrv", "We
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDoorCreator.SDK", "WebDoorCreator.SDK\WebDoorCreator.SDK.csproj", "{4A07ADFC-CA24-4135-BA97-3B8E5D49BC09}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestExtProc", "TestExtProc\TestExtProc.csproj", "{88099151-7136-4825-9B5D-B5A6899FD0AF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -23,10 +21,6 @@ Global
|
||||
{4A07ADFC-CA24-4135-BA97-3B8E5D49BC09}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4A07ADFC-CA24-4135-BA97-3B8E5D49BC09}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A07ADFC-CA24-4135-BA97-3B8E5D49BC09}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{88099151-7136-4825-9B5D-B5A6899FD0AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{88099151-7136-4825-9B5D-B5A6899FD0AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{88099151-7136-4825-9B5D-B5A6899FD0AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{88099151-7136-4825-9B5D-B5A6899FD0AF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -45,12 +45,22 @@ namespace WebDoorCreator.Core
|
||||
public const string rKeyListValues = $"{redisBaseAddr}:Cache:ListValues";
|
||||
public const string rKeyDoorLast = $"{redisBaseAddr}:Cache:DoorList";
|
||||
public const string rKeyDoorsByOrder = $"{redisBaseAddr}:Cache:DoorsByOrder";
|
||||
public const string rKeyOrderByComp = $"{redisBaseAddr}:Cache:OrderByComp";
|
||||
public const string rKeyOrderDetail = $"{redisBaseAddr}:Cache:OrderDetail";
|
||||
public const string rKeyOrderStatus = $"{redisBaseAddr}:Cache:OrderStatus";
|
||||
public const string rKeyRoles = $"{redisBaseAddr}:Cache:Roles";
|
||||
public const string rKeyUsers = $"{redisBaseAddr}:Cache:Users";
|
||||
public const string rKeyUsersAll = $"{redisBaseAddr}:Cache:UsersAll";
|
||||
public const string rKeyUsersData = $"{redisBaseAddr}:Cache:UsersData";
|
||||
public const string rKeyUsersDataSearch = $"{rKeyUsersData}:Search";
|
||||
public const string rKeyUsersView = $"{redisBaseAddr}:Cache:UsersView";
|
||||
public const string rKeyVocLemma = $"{redisBaseAddr}:Cache:VocLemma";
|
||||
public const string rKeyVocLemmaTEMP = $"{redisBaseAddr}:Cache:VocLemmaTEMP";
|
||||
public const string rKeyLanguage = $"{redisBaseAddr}:Cache:Languages";
|
||||
|
||||
/// <summary>
|
||||
/// variabili accessorie ulteriori
|
||||
/// </summary>
|
||||
public const int StatusIdTemplate = 10000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
using Microsoft.Reporting.NETCore;
|
||||
using Microsoft.ReportingServices.ReportProcessing.ReportObjectModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace WebDoorCreator.Core.ReportViewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Gestione report dotNet core
|
||||
///
|
||||
/// https://github.com/lkosson/reportviewercore/
|
||||
/// </summary>
|
||||
public class Report
|
||||
{
|
||||
/// <summary>
|
||||
/// Effettua setup del Report corrente
|
||||
/// </summary>
|
||||
/// <param name="ReportObj">Oggetto LocalReport da impiegare</param>
|
||||
/// <param name="FileNameRdlc">Nome del Report (file rdlc) da usare</param>
|
||||
/// <param name="RepParams">Parametri opzionali report</param>
|
||||
/// <param name="ReportDatasets">Dizionario dei dataset del report (DsName + DataTable relativa)</param>
|
||||
public static void Load(LocalReport ReportObj, string FileNameRdlc, List<ReportParameter> RepParams, Dictionary<string, DataTable> ReportDatasets)
|
||||
{
|
||||
|
||||
// setup preliminari
|
||||
ReportObj.EnableExternalImages = true;
|
||||
// calcolo path complessivo
|
||||
string reportPath = Path.Combine(AppContext.BaseDirectory, "Reports", FileNameRdlc);
|
||||
/*------------------------------------------------------------------------------------------
|
||||
* NB: SE volessi includere i ReportObj come EMBEDDED potrei usare una versione alternativa,
|
||||
* ad esempio (x ReportObj inclusi in area WebDoorCreator.Core\ReportViewer\Report.rdlc
|
||||
*
|
||||
* using var rs = Assembly.GetExecutingAssembly().GetManifestResourceStream("WebDoorCreator.Core.ReportViewer.Report.rdlc");
|
||||
* ReportObj.LoadReportDefinition(rs);
|
||||
*
|
||||
* oppure con filestream
|
||||
* using (FileStream fs = File.OpenRead(reportPath))
|
||||
* {
|
||||
* ReportObj.LoadReportDefinition(fs);
|
||||
* ....
|
||||
* }
|
||||
*
|
||||
* ------------------------------------------------------------------------------------------*/
|
||||
ReportObj.ReportPath = reportPath;
|
||||
foreach (var item in ReportDatasets)
|
||||
{
|
||||
ReportObj.DataSources.Add(new ReportDataSource(item.Key, item.Value));
|
||||
}
|
||||
ReportObj.SetParameters(RepParams);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parametri associati al report
|
||||
/// </summary>
|
||||
public class RenderParams
|
||||
{
|
||||
public string FileName { get; set; } = "";
|
||||
public string Extension { get; set; } = "";
|
||||
public string MimeType { get; set; } = "";
|
||||
public string RenderFormat { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Crea setup parametri report dato formato desiderato
|
||||
/// </summary>
|
||||
/// <param name="OutFormat"></param>
|
||||
public RenderParams(string OutFormat)
|
||||
{
|
||||
this.FileName = $"{DateTime.Now:yyyyMMdd_HHmmss}";
|
||||
switch (OutFormat.ToUpper())
|
||||
{
|
||||
case "HTML":
|
||||
this.Extension = "html";
|
||||
this.RenderFormat = "HTML5";
|
||||
this.MimeType = "text/html";
|
||||
break;
|
||||
|
||||
case "DOCX":
|
||||
this.Extension = "docx";
|
||||
this.RenderFormat = "WORDOPENXML";
|
||||
this.MimeType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
||||
break;
|
||||
|
||||
case "XLSX":
|
||||
this.Extension = "xlsx";
|
||||
this.RenderFormat = "EXCELOPENXML";
|
||||
this.MimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
break;
|
||||
|
||||
case "PDF":
|
||||
default:
|
||||
this.Extension = "pdf";
|
||||
this.RenderFormat = "PDF";
|
||||
this.MimeType = "application/pdf";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,447 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<DataSources>
|
||||
<DataSource Name="LocalSource">
|
||||
<ConnectionProperties>
|
||||
<DataProvider>System.Data.DataSet</DataProvider>
|
||||
<ConnectString>/* Local Connection */</ConnectString>
|
||||
</ConnectionProperties>
|
||||
<rd:DataSourceID>bd60bef3-b3d9-477e-9052-ab58c6f1ec86</rd:DataSourceID>
|
||||
</DataSource>
|
||||
</DataSources>
|
||||
<DataSets>
|
||||
<DataSet Name="Items">
|
||||
<Query>
|
||||
<DataSourceName>LocalSource</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="Description">
|
||||
<DataField>Description</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Price">
|
||||
<DataField>Price</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Qty">
|
||||
<DataField>Qty</DataField>
|
||||
<rd:TypeName>System.Int32</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Total">
|
||||
<DataField>Total</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>LocalSource</rd:DataSetName>
|
||||
<rd:TableName>Items</rd:TableName>
|
||||
<rd:ObjectDataSourceType>ReportViewerCore.ReportItem</rd:ObjectDataSourceType>
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
<ReportSections>
|
||||
<ReportSection>
|
||||
<Body>
|
||||
<ReportItems>
|
||||
<Tablix Name="Tablix1">
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>8.31785cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.67938cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Description</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox3">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Price</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox5">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Qty</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox2">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Total</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.67938cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Description">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Description.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Description</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Price">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Price.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Price</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Qty">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Qty.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Qty</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Total">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Total.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Total</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
</TablixRows>
|
||||
</TablixBody>
|
||||
<TablixColumnHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember>
|
||||
<KeepWithGroup>After</KeepWithGroup>
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<Group Name="Details" />
|
||||
</TablixMember>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>Items</DataSetName>
|
||||
<Top>2.85433cm</Top>
|
||||
<Left>0.3175cm</Left>
|
||||
<Height>1.35875cm</Height>
|
||||
<Width>15.875cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Tablix>
|
||||
<Textbox Name="Textbox6">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Title.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontSize>26pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||
<Top>0.26141cm</Top>
|
||||
<Left>0.3175cm</Left>
|
||||
<Height>1.79062cm</Height>
|
||||
<Width>15.875cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>2in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>6.5in</Width>
|
||||
<Page>
|
||||
<PageHeight>29.7cm</PageHeight>
|
||||
<PageWidth>21cm</PageWidth>
|
||||
<LeftMargin>2cm</LeftMargin>
|
||||
<RightMargin>2cm</RightMargin>
|
||||
<TopMargin>2cm</TopMargin>
|
||||
<BottomMargin>2cm</BottomMargin>
|
||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
||||
<Style />
|
||||
</Page>
|
||||
</ReportSection>
|
||||
</ReportSections>
|
||||
<ReportParameters>
|
||||
<ReportParameter Name="Title">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<ReportParametersLayout>
|
||||
<GridLayoutDefinition>
|
||||
<NumberOfColumns>4</NumberOfColumns>
|
||||
<NumberOfRows>2</NumberOfRows>
|
||||
<CellDefinitions>
|
||||
<CellDefinition>
|
||||
<ColumnIndex>0</ColumnIndex>
|
||||
<RowIndex>0</RowIndex>
|
||||
<ParameterName>Title</ParameterName>
|
||||
</CellDefinition>
|
||||
</CellDefinitions>
|
||||
</GridLayoutDefinition>
|
||||
</ReportParametersLayout>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>156b21d2-9542-4902-99ef-7ec823774bb2</rd:ReportID>
|
||||
</Report>
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebDoorCreator.Core.ReportViewer
|
||||
{
|
||||
public class ReportItem
|
||||
{
|
||||
public string Description { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
public int Qty { get; set; }
|
||||
public decimal Total => Price * Qty;
|
||||
}
|
||||
}
|
||||
@@ -6,11 +6,27 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="ReportViewer\ReportExtUtils.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="ReportViewer\Report.rdlc" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EntityFrameworkCore.SqlServer.HierarchyId" Version="3.0.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.14" />
|
||||
<PackageReference Include="NLog" Version="5.1.2" />
|
||||
<PackageReference Include="ReportViewerCore.NETCore" Version="15.1.17" />
|
||||
<PackageReference Include="ToDataTable" Version="0.1.2" />
|
||||
<PackageReference Include="YamlDotNet" Version="13.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ReportViewer\Report.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Microsoft.AspNetCore.Server.IISIntegration;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NLog;
|
||||
using Org.BouncyCastle.Ocsp;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Reflection.Emit;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.DTO;
|
||||
|
||||
@@ -195,6 +199,34 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Getting door data by key
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DoorModel? DoorGetByKey(int doorId)
|
||||
{
|
||||
DoorModel? dbResult = new DoorModel();
|
||||
// retrieving data from db
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// extracting entire set
|
||||
dbResult = localDbCtx.DbSetDoor
|
||||
.Where(x => x.DoorId == doorId)
|
||||
.Include(o => o.OrderNav)
|
||||
.OrderBy(x => x.DoorId)
|
||||
.AsNoTracking()
|
||||
.FirstOrDefault();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in DoorGetByKey:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new door
|
||||
/// </summary>
|
||||
@@ -493,6 +525,82 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
/// <summary>
|
||||
/// Retrieving data from door operation type table filtered by Hw Code
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DoorOpTypeModel> DoorOpTypeGetFiltered(string hwCode, int parentId)
|
||||
{
|
||||
List<DoorOpTypeModel> dbResult = new List<DoorOpTypeModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
if (hwCode == "*" && parentId == -1)
|
||||
{
|
||||
// extracting entire set
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
}
|
||||
else if (hwCode != "*" && parentId == -1)
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => x.HwCode == hwCode)
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
}
|
||||
else if (hwCode == "*" && parentId >= 0)
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => x.ParentId == parentId)
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
}
|
||||
else if (hwCode != "*" && parentId >= 0)
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => (x.ParentId == parentId) && x.HwCode == hwCode)
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in DoorOpTypeGetAll:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
/// <summary>
|
||||
/// Retrieving data from door operation type table filtered by path
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DoorOpTypeModel> DoorOpTypeGetByPath(string path)
|
||||
{
|
||||
List<DoorOpTypeModel> dbResult = new List<DoorOpTypeModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => x.OpCode.StartsWith(path))
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in DoorOpTypeGetByPath:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public async Task<List<DoorOpTypeModel>> DoorOpTypeGetDefault()
|
||||
{
|
||||
@@ -570,7 +678,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
.DbSetDoor
|
||||
.Where(x => x.OrderId == orderId)
|
||||
.Include(o => o.OrderNav)
|
||||
.Include(t => t.TypeNav)
|
||||
.OrderBy(x => x.DoorId)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
@@ -599,7 +706,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoor
|
||||
.Include(o => o.OrderNav)
|
||||
.Include(t => t.TypeNav)
|
||||
.OrderByDescending(x => x.DoorId)
|
||||
.Take(numRec)
|
||||
.AsNoTracking()
|
||||
@@ -613,6 +719,43 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update costing for dictionary of doors
|
||||
/// </summary>
|
||||
/// <param name="DoorUnitCosts"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorUpdateCosts(Dictionary<int, decimal> DoorUnitCosts)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// ciclo x ogni porta...
|
||||
|
||||
foreach (var item in DoorUnitCosts)
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoor
|
||||
.Where(x => x.DoorId == item.Key)
|
||||
.FirstOrDefault();
|
||||
if (currRec != null) //if is not null edit the record found
|
||||
{
|
||||
currRec.UnitCost = item.Value;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorUpdateCosts: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Modifying or adding a new door
|
||||
/// </summary>
|
||||
@@ -630,12 +773,17 @@ namespace WebDoorCreator.Data.Controllers
|
||||
.DbSetDoor
|
||||
.Where(x => x.DoorId == addEditRec.DoorId)
|
||||
.FirstOrDefault();
|
||||
if (currRec != null) //if is not null edit the record found
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.Quantity = addEditRec.Quantity;
|
||||
currRec.DoorExtCode = addEditRec.DoorExtCode;
|
||||
currRec.DoorDescript = addEditRec.DoorDescript;
|
||||
currRec.ParentId = addEditRec.ParentId;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
else //if is null add the record as new in the table
|
||||
//if is null add the record as new in the table
|
||||
else
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetDoor
|
||||
@@ -651,6 +799,64 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
/// <summary>
|
||||
/// Modifying doorOpType
|
||||
/// </summary>
|
||||
/// <param name="addEditRec">Record to edit</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpTypeUpdate(DoorOpTypeModel addEditRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
//List<ItemModel> dbResult = new List<ItemModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => x.DoorOpTypId == addEditRec.DoorOpTypId)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.ParentId = addEditRec.ParentId;
|
||||
currRec.OpCode = addEditRec.OpCode;
|
||||
currRec.Description = addEditRec.Description;
|
||||
currRec.IsDefault = addEditRec.IsDefault;
|
||||
currRec.HasHw = addEditRec.HasHw;
|
||||
currRec.IsConcrete = addEditRec.IsConcrete;
|
||||
currRec.HwCode = addEditRec.HwCode;
|
||||
currRec.HwDescription = addEditRec.HwDescription;
|
||||
currRec.DisplayUrl = addEditRec.DisplayUrl;
|
||||
currRec.FPath = addEditRec.FPath;
|
||||
currRec.UnitCost = addEditRec.UnitCost;
|
||||
currRec.ExtOpCode = addEditRec.ExtOpCode;
|
||||
currRec.ExtDescript = addEditRec.ExtDescript;
|
||||
currRec.Rev = addEditRec.Rev;
|
||||
currRec.ValidFrom = addEditRec.ValidFrom;
|
||||
currRec.ValidUntil = addEditRec.ValidUntil;
|
||||
currRec.FileMD5 = addEditRec.FileMD5;
|
||||
currRec.FileDim = addEditRec.FileDim;
|
||||
currRec.LastMod = addEditRec.LastMod;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
//if is null add the record as new in the table
|
||||
else
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Add(addEditRec);
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpTypeUpdate: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Estraggo tutte le lingue disponibili per questa applicazione
|
||||
@@ -677,7 +883,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new list value
|
||||
/// Adding new list value set
|
||||
/// </summary>
|
||||
/// <param name="addRec">Record to add</param>
|
||||
/// <returns></returns>
|
||||
@@ -700,14 +906,12 @@ namespace WebDoorCreator.Data.Controllers
|
||||
.AddRange(addList);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// stored di merge dati in vocabolario
|
||||
// stored di merge dati in ListVal
|
||||
storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_ListVal_Import");
|
||||
|
||||
fatto = true;
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -717,6 +921,45 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding new DoorOpType data
|
||||
/// </summary>
|
||||
/// <param name="addRec">Record to add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpTypeAdd(List<DoorOpTypeTempModel> addList)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// stored di reset ListValues
|
||||
var storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_DoorOpType_Prepare");
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// import massivo dati in tab temp
|
||||
localDbCtx
|
||||
.DbSetDoorOpTypeTemp
|
||||
.AddRange(addList);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// stored di merge dati in DoorOpType
|
||||
storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_DoorOpType_Import");
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpTypeAdd: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ListValues list (All)
|
||||
/// </summary>
|
||||
@@ -767,10 +1010,10 @@ namespace WebDoorCreator.Data.Controllers
|
||||
/// Adding a new order
|
||||
/// </summary>
|
||||
/// <param name="addRec">Record to add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> OrderAdd(OrderModel addRec)
|
||||
/// <returns>OrderId</returns>
|
||||
public async Task<int> OrderAdd(OrderModel addRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
int newOrdId = 0;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
@@ -779,16 +1022,75 @@ namespace WebDoorCreator.Data.Controllers
|
||||
.DbSetOrders
|
||||
.Add(addRec);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
newOrdId = addRec.OrderId;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderAdd: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return newOrdId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Duplicazione di un ordine da SRC a DEST (Doors + DoorOp)
|
||||
/// </summary>
|
||||
/// <param name="OrdIdSrc"></param>
|
||||
/// <param name="OrdIdDest"></param>
|
||||
/// <param name="UsrIdMod"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> OrderDuplicate(int OrdIdSrc, int OrdIdDest, string UsrIdMod)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var OrderIdSrc = new SqlParameter("@OrderIdSrc", OrdIdSrc);
|
||||
var OrderIdDest = new SqlParameter("@OrderIdDest", OrdIdDest);
|
||||
var UserIdMod = new SqlParameter("@UserIdMod", UsrIdMod);
|
||||
|
||||
// stored di cloning dati ordine
|
||||
var storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_OrderClone @OrderIdSrc, @OrderIdDest, @UserIdMod", OrderIdSrc, OrderIdDest, UserIdMod);
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderDuplicate:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public List<OrderModel> OrderGetByCompStatus(int CompanyId, int StatusId)
|
||||
{
|
||||
List<OrderModel> dbResult = new List<OrderModel>();
|
||||
using (var dbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var rawData = dbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.CompanyId == CompanyId && x.Status == StatusId)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
if (rawData != null)
|
||||
{
|
||||
dbResult = rawData;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in OrderGetByCompStatus:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public OrderModel OrderGetByKey(int orderId)
|
||||
{
|
||||
OrderModel dbResult = new OrderModel();
|
||||
@@ -799,6 +1101,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
var rawData = dbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.OrderId == orderId)
|
||||
.Include(c => c.CompanyNav)
|
||||
.AsNoTracking()
|
||||
.FirstOrDefault();
|
||||
if (rawData != null)
|
||||
@@ -964,6 +1267,34 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Order Data for report printing
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <returns></returns>
|
||||
public List<PrtRepOrderModel> PreRepOrderGetByKey(int orderId)
|
||||
{
|
||||
List<PrtRepOrderModel> dbResult = new List<PrtRepOrderModel>();
|
||||
using (var dbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var OrderId = new SqlParameter("@OrderId", orderId);
|
||||
|
||||
dbResult = dbCtx
|
||||
.DbSetPrtRepOrder
|
||||
.FromSqlRaw("exec dbo.stp_prt_OrderReportExpl @OrderId", OrderId)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in PreRepOrderGetByKey:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieving data from roles table
|
||||
/// </summary>
|
||||
@@ -1014,6 +1345,59 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new User
|
||||
/// </summary>
|
||||
/// <param name="addEditRec">Record to edit or add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> UserAddMod(AspNetUsers addEditRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
//List<ItemModel> dbResult = new List<ItemModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetUsers
|
||||
.Where(x => x.Id == addEditRec.Id)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.Id = addEditRec.Id;
|
||||
currRec.UserName = addEditRec.UserName;
|
||||
currRec.NormalizedUserName = addEditRec.NormalizedUserName;
|
||||
currRec.Email = addEditRec.Email;
|
||||
currRec.EmailConfirmed = addEditRec.EmailConfirmed;
|
||||
currRec.LockoutEnabled = addEditRec.LockoutEnabled;
|
||||
currRec.LockoutEnd = addEditRec.LockoutEnd;
|
||||
currRec.ConcurrencyStamp = addEditRec.ConcurrencyStamp;
|
||||
currRec.SecurityStamp = addEditRec.SecurityStamp;
|
||||
currRec.AccessFailedCount = addEditRec.AccessFailedCount;
|
||||
currRec.PhoneNumberConfirmed = addEditRec.PhoneNumberConfirmed;
|
||||
currRec.PhoneNumber = addEditRec.PhoneNumber;
|
||||
currRec.TwoFactorEnabled = addEditRec.TwoFactorEnabled;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
//if is null add the record as new in the table
|
||||
else
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetUsers
|
||||
.Add(addEditRec);
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante CompanyAddMod: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Populating DTO to handle users
|
||||
/// </summary>
|
||||
@@ -1164,14 +1548,39 @@ namespace WebDoorCreator.Data.Controllers
|
||||
/// <summary>
|
||||
/// Aggiunta di un nuovo set di lemmi
|
||||
/// </summary>
|
||||
/// <param name="listNewTerms"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> VocLemmaInsert(List<VocabularyTempModel> listNewTerms)
|
||||
public async Task<bool> VocLemmaInsert()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
bool fatto = false;
|
||||
|
||||
//var o = listNewTerms.Where(x => x.Traduzione.Length > 200).ToList();
|
||||
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
//bool isOk = await VocLemmaInsertPrepare(listNewTerms);
|
||||
|
||||
// stored di merge dati in vocabolario
|
||||
var storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_Voc_Import");
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante VocLemmaInsert: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public async Task<bool> VocLemmaInsertPrepare(List<VocabularyTempModel> listNewTerms)
|
||||
{
|
||||
bool fatto = false;
|
||||
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
@@ -1188,20 +1597,112 @@ namespace WebDoorCreator.Data.Controllers
|
||||
.AddRange(listNewTerms);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// stored di merge dati in vocabolario
|
||||
storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_Voc_Import");
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante VocLemmaInsert: {Environment.NewLine}{exc}");
|
||||
Log.Error($"Eccezione durante VocLemmaInsertPrepare: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
public async Task<bool> VocLemmaSetConf(string lingua, string lemma, bool isConf)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
bool fatto = false;
|
||||
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
// import massivo dati in tab temp
|
||||
var termSearch = localDbCtx
|
||||
.DbSetVocabularyTemp
|
||||
.Where(x => x.Lingua == lingua && x.Lemma == lemma)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (termSearch != null)
|
||||
{
|
||||
termSearch.IsConfSave = isConf;
|
||||
|
||||
localDbCtx.Entry(termSearch).State = EntityState.Modified;
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante VocLemmaSetConf: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
public async Task<VocabularyTempModel> VocLemmaFindByKeys(string lingua, string lemma)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
VocabularyTempModel dbResult = new VocabularyTempModel();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
// import massivo dati in tab temp
|
||||
var termSearch = localDbCtx
|
||||
.DbSetVocabularyTemp
|
||||
.Where(x => x.Lingua == lingua && x.Lemma == lemma)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (termSearch != null)
|
||||
{
|
||||
dbResult = termSearch;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante VocLemmaCheckConf: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public Dictionary<string, Dictionary<string, string>> VocLemmaTEMPGetAll()
|
||||
{
|
||||
Dictionary<string, Dictionary<string, string>> DTOResult = new Dictionary<string, Dictionary<string, string>>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
List<string> lingue = new List<string>()
|
||||
{
|
||||
"IT",
|
||||
"EN"
|
||||
};
|
||||
|
||||
// extracting entire set
|
||||
var allVoc = localDbCtx
|
||||
.DbSetVocabularyTemp
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
|
||||
foreach (var lingua in lingue)
|
||||
{
|
||||
Dictionary<string, string> dict = new Dictionary<string, string>();
|
||||
foreach (var lemma in allVoc.Where(x => x.Lingua == lingua))
|
||||
{
|
||||
dict.Add(lemma.Lemma, lemma.Traduzione);
|
||||
}
|
||||
DTOResult.Add(lingua, dict);
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in VocLemmaTEMPGetAll:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return DTOResult;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace WebDoorCreator.Data.DTO
|
||||
/// </summary>
|
||||
public string SvgGen { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Articat path (ex 3d zip/pack)
|
||||
/// Artifats path (ex 3d zip/pack)
|
||||
/// </summary>
|
||||
public string artifactPath { get; set; } = "";
|
||||
}
|
||||
|
||||
@@ -13,13 +13,10 @@ namespace WebDoorCreator.Data.DTO
|
||||
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 int Quantity { get; set; } = 1;
|
||||
|
||||
public double EstimatedWorkTime { get; set; } = 0;
|
||||
|
||||
public Dictionary<string, double> BOMList { get; set; }= new Dictionary<string, double>();
|
||||
public Dictionary<string, List<string>> BOMList { get; set; }= new Dictionary<string, List<string>>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Door cost data DTO
|
||||
/// </summary>
|
||||
public class DoorPriceDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Door UID
|
||||
/// </summary>
|
||||
public int OrderId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Door UID
|
||||
/// </summary>
|
||||
public int DoorId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Articat path (ex 3d zip/pack)
|
||||
/// </summary>
|
||||
public decimal UnitCost { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Valid = true / cannot deliver = false
|
||||
/// </summary>
|
||||
public bool Valid { get; set; } = true;
|
||||
/// <summary>
|
||||
/// Error message (optional)
|
||||
/// </summary>
|
||||
public string ErrorMsg { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// COmpany data DTO
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class FileDTO
|
||||
{
|
||||
public string HwCode { get; set; } = "";
|
||||
public string FileBaseDir { get; set; } = "";
|
||||
public string FileAbsPath { get; set; } = "";
|
||||
public string FileRelPath { get; set; } = "";
|
||||
public string FileMD5 { get; set; } = "";
|
||||
public long FileDim { get; set; } = 0;
|
||||
public DateTime lastModTime { get; set; } = DateTime.Now;
|
||||
public int status { get; set; } = 0;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,11 @@ namespace WebDoorCreator.Data.DbModels
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int DoorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Parent element ID
|
||||
/// </summary>
|
||||
public int ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ordine cui è associata la porta
|
||||
/// </summary>
|
||||
@@ -32,11 +37,6 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string MeasureUnit { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Door's Type
|
||||
/// </summary>
|
||||
public int TypeId { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
/// </summary>
|
||||
@@ -91,8 +91,8 @@ namespace WebDoorCreator.Data.DbModels
|
||||
[ForeignKey("OrderId")]
|
||||
public virtual OrderModel? OrderNav { get; set; }
|
||||
|
||||
[ForeignKey("TypeId")]
|
||||
public virtual DoorTypeModel? TypeNav { get; set; }
|
||||
//[ForeignKey("TypeId")]
|
||||
// public virtual DoorTypeModel? TypeNav { get; set; }
|
||||
|
||||
|
||||
public DoorModel ObjClone(string userId)
|
||||
@@ -102,7 +102,7 @@ namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
MeasureUnit = MeasureUnit,
|
||||
OrderId = OrderId,
|
||||
TypeId = TypeId,
|
||||
ParentId = ParentId,
|
||||
DoorExtCode = DoorExtCode,
|
||||
DateIns = adesso,
|
||||
UserIdIns = userId,
|
||||
@@ -116,5 +116,40 @@ namespace WebDoorCreator.Data.DbModels
|
||||
};
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
|
||||
if (!(obj is DoorModel item))
|
||||
return false;
|
||||
|
||||
if (Quantity != item.Quantity)
|
||||
return false;
|
||||
|
||||
if (DoorExtCode != item.DoorExtCode)
|
||||
return false;
|
||||
|
||||
if (DoorDescript != item.DoorDescript)
|
||||
return false;
|
||||
|
||||
//if (OrderId != item.OrderId)
|
||||
// return false;
|
||||
|
||||
//if (MeasureUnit != item.MeasureUnit)
|
||||
// return false;
|
||||
|
||||
//if (UnitCost != item.UnitCost)
|
||||
// return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,9 +156,10 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// <summary>
|
||||
/// Clone oggetto
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="userName"></param>
|
||||
/// <param name="doorId"></param>
|
||||
/// <returns></returns>
|
||||
public DoorOpModel ObjClone(string userId, int doorId)
|
||||
public DoorOpModel ObjClone(string userName, int doorId)
|
||||
{
|
||||
DoorOpModel answ = new DoorOpModel();
|
||||
DateTime adesso = DateTime.Now;
|
||||
@@ -168,8 +169,8 @@ namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
DateIns = adesso,
|
||||
DateMod = adesso,
|
||||
UserIdIns = userId,
|
||||
UserIdMod = userId,
|
||||
UserIdIns = userName,
|
||||
UserIdMod = userName,
|
||||
ObjectId = ObjectId,
|
||||
DoorId = DoorId,
|
||||
JsoncConfigVal = JsoncConfigVal,
|
||||
@@ -184,8 +185,8 @@ namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
DateIns = adesso,
|
||||
DateMod = adesso,
|
||||
UserIdIns = userId,
|
||||
UserIdMod = userId,
|
||||
UserIdIns = userName,
|
||||
UserIdMod = userName,
|
||||
ObjectId = ObjectId,
|
||||
DoorId = doorId,
|
||||
JsoncConfigVal = JsoncConfigVal,
|
||||
@@ -197,6 +198,5 @@ namespace WebDoorCreator.Data.DbModels
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,11 @@ namespace WebDoorCreator.Data.DbModels
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int DoorOpTypId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indica Id del parent: se 0 sono root, altrimenti indica il type parent
|
||||
/// </summary>
|
||||
public int ParentId { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Codice univoco dell'operazione da svolgere (calcolato, idealmente 4 char da 36 val 0..Z)
|
||||
/// </summary>
|
||||
@@ -68,20 +73,14 @@ namespace WebDoorCreator.Data.DbModels
|
||||
public string FPath { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Idx univoco dell'elemento parent (se 0 = root)
|
||||
/// Unit cost for the door
|
||||
/// </summary>
|
||||
public int ParentDoorOpId { get; set; } = 0;
|
||||
public decimal UnitCost { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Idx univoco dell'elemento parent (se 0 = root)
|
||||
/// </summary>
|
||||
public HierarchyId? DoorOpIdPathFromPatriarch { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Oggetto Json per specifica configurazione (template)
|
||||
/// </summary>
|
||||
public string JsoncConfig { get; set; } = "";
|
||||
///// <summary>
|
||||
///// Oggetto Json per specifica configurazione (template)
|
||||
///// </summary>
|
||||
//public string JsoncConfig { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno (opzionale)
|
||||
@@ -108,6 +107,21 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public DateTime ValidUntil { get; set; } = new DateTime(3000, 1, 1);
|
||||
|
||||
/// <summary>
|
||||
/// MD5 Calcolato per controllo uguaglianze
|
||||
/// </summary>
|
||||
public string FileMD5 { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Dimensione file corrente
|
||||
/// </summary>
|
||||
public long FileDim { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Dimensione file corrente
|
||||
/// </summary>
|
||||
public DateTime LastMod { get; set; } = DateTime.Today;
|
||||
|
||||
/// <summary>
|
||||
/// Check validità item
|
||||
/// </summary>
|
||||
@@ -116,7 +130,11 @@ namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
get => DateTime.Today >= ValidFrom && DateTime.Today <= ValidUntil;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stato della door operation {-1=DELETED, 0=UNCHANGED, 1=ADDED, 2=MODIFIED}
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public int status { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Numero massimo associabile a singola Door
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Tabella dati Door Operation Type (astratte) TEMP
|
||||
/// </summary>
|
||||
[Table("DoorOpTypeTemp")]
|
||||
public class DoorOpTypeTempModel
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int DoorOpTypId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Codice univoco dell'operazione da svolgere (calcolato, idealmente 4 char da 36 val 0..Z)
|
||||
/// </summary>
|
||||
public string OpCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione
|
||||
/// </summary>
|
||||
public string Description { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Indica se sia da creare sempre
|
||||
/// </summary>
|
||||
public bool IsDefault { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Indica se ci sia un hardware correlato all'operazione
|
||||
/// </summary>
|
||||
public bool HasHw { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Indica se sia un oggetto concreto (= con un file, che si può produrre) o abstract (ha figli, è un gruppo logico)
|
||||
/// </summary>
|
||||
public bool IsConcrete { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Codice dell'HW collegato
|
||||
/// </summary>
|
||||
public string HwCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione dell'HW collegato
|
||||
/// </summary>
|
||||
public string HwDescription { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// URL dell'immagine/link di riferimento
|
||||
/// </summary>
|
||||
public string DisplayUrl { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Path folder/file di riferimento
|
||||
/// </summary>
|
||||
public string FPath { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Idx univoco dell'elemento parent (se 0 = root)
|
||||
/// </summary>
|
||||
public int ParentDoorOpId { get; set; } = 0;
|
||||
|
||||
///// <summary>
|
||||
///// Idx univoco dell'elemento parent (se 0 = root)
|
||||
///// </summary>
|
||||
//public HierarchyId? DoorOpIdPathFromPatriarch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unit cost for the door
|
||||
/// </summary>
|
||||
public decimal UnitCost { get; set; } = 0;
|
||||
|
||||
///// <summary>
|
||||
///// Oggetto Json per specifica configurazione (template)
|
||||
///// </summary>
|
||||
//public string JsoncConfig { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno (opzionale)
|
||||
/// </summary>
|
||||
public string ExtOpCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione esterna (opzionale)
|
||||
/// </summary>
|
||||
public string ExtDescript { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Revisione dell'item
|
||||
/// </summary>
|
||||
public string Rev { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Inizio validità item
|
||||
/// </summary>
|
||||
public DateTime ValidFrom { get; set; } = new DateTime(2000, 1, 1);
|
||||
|
||||
/// <summary>
|
||||
/// Fine validità item
|
||||
/// </summary>
|
||||
public DateTime ValidUntil { get; set; } = new DateTime(3000, 1, 1);
|
||||
|
||||
/// <summary>
|
||||
/// MD5 Calcolato per controllo uguaglianze
|
||||
/// </summary>
|
||||
public string FileMD5 { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Dimensione file corrente
|
||||
/// </summary>
|
||||
public long FileDim { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Data ultima modifica
|
||||
/// </summary>
|
||||
public DateTime LastMod { get; set; } = DateTime.Today;
|
||||
|
||||
/// <summary>
|
||||
/// Check validità item
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public bool IsActive
|
||||
{
|
||||
get => DateTime.Today >= ValidFrom && DateTime.Today <= ValidUntil;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Numero massimo associabile a singola Door
|
||||
/// </summary>
|
||||
public int MaxAllowed { get; set; } = 1;
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Tabella dati Door Type
|
||||
/// </summary>
|
||||
[Table("DoorType")]
|
||||
public class DoorTypeModel
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int TypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Codice univoco del modello
|
||||
/// </summary>
|
||||
public string TypeCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione
|
||||
/// </summary>
|
||||
public string Description { get; set; } = "";
|
||||
|
||||
}
|
||||
}
|
||||
@@ -12,18 +12,33 @@ namespace WebDoorCreator.Data.DbModels
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
[Table("SerializedDoors")]
|
||||
public partial class SerializedDoorsModel
|
||||
[Table("ListValues")]
|
||||
public partial class ListValuesModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int DoorTmpId { get; set; }
|
||||
[MaxLength(50)]
|
||||
public string TableName { get; set; }
|
||||
|
||||
|
||||
public string DoorSerVal { get; set; }
|
||||
[MaxLength(50)]
|
||||
public string FieldName { get; set; }
|
||||
|
||||
public bool Lock { get; set; }
|
||||
[MaxLength(250)]
|
||||
public string Value { get; set; }
|
||||
|
||||
[MaxLength(250)]
|
||||
public string Label { get; set; }
|
||||
|
||||
public int Ordinal { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string InputType{ get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string DefaultVal { get; set; }
|
||||
|
||||
[MaxLength(5)]
|
||||
public bool isSerializable { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@ namespace WebDoorCreator.Data.DbModels
|
||||
[MaxLength(50)]
|
||||
public string FieldName { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
[MaxLength(250)]
|
||||
public string Value { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
[MaxLength(250)]
|
||||
public string Label { get; set; }
|
||||
|
||||
public int Ordinal { get; set; }
|
||||
|
||||
@@ -51,6 +51,16 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string UserIdMod { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Data promessa di consegna
|
||||
/// </summary>
|
||||
public DateTime DateDelivery { get; set; } = DateTime.Now.AddDays(60);
|
||||
|
||||
/// <summary>
|
||||
/// Eventuale sconto globale
|
||||
/// </summary>
|
||||
public double Discount { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Stato globale dell'ordine
|
||||
/// </summary>
|
||||
@@ -65,5 +75,6 @@ namespace WebDoorCreator.Data.DbModels
|
||||
|
||||
[ForeignKey("CompanyId")]
|
||||
public virtual CompanyModel? CompanyNav { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// <summary>
|
||||
/// View to retrieve data from multiple tables
|
||||
/// </summary>
|
||||
//[Table("v_OrderStatus")]
|
||||
public class OrderStatusViewModel
|
||||
{
|
||||
/// <summary>
|
||||
@@ -70,5 +69,16 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// TotCost represent the total cost of the order
|
||||
/// </summary>
|
||||
public decimal TotCost { get; set; } = 0;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Data promessa di consegna
|
||||
/// </summary>
|
||||
public DateTime DateDelivery { get; set; } = DateTime.Now.AddDays(60);
|
||||
|
||||
/// <summary>
|
||||
/// Eventuale sconto globale
|
||||
/// </summary>
|
||||
public double Discount { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static WebDoorCreator.Core.Enum;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
public class PrtRepOrderModel
|
||||
{
|
||||
public int OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Company cui è associato l'ordine
|
||||
/// </summary>
|
||||
public int CompanyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
/// </summary>
|
||||
public string OrderExtCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Data inserimento ordine
|
||||
/// </summary>
|
||||
public DateTime DateIns { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// Codice utente che ha creato
|
||||
/// </summary>
|
||||
public string UserIdIns { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Data (ultima) modifica ordine
|
||||
/// </summary>
|
||||
public DateTime DateMod { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// Codice utente che ha creato
|
||||
/// </summary>
|
||||
public string UserIdMod { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Stato globale dell'ordine
|
||||
/// </summary>
|
||||
public int Status { get; set; } = 10;
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione
|
||||
/// </summary>
|
||||
public string OrderDescript { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
/// </summary>
|
||||
public string CompanyExtCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome / ragione Sociale
|
||||
/// </summary>
|
||||
public string CompanyName { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// indirizzo
|
||||
/// </summary>
|
||||
public string Address { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// CAP
|
||||
/// </summary>
|
||||
public int ZipCode { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Citta
|
||||
/// </summary>
|
||||
public string City { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Stato
|
||||
/// </summary>
|
||||
public string State { get; set; } = "";
|
||||
/// <summary>
|
||||
/// VAT / P.Iva
|
||||
/// </summary>
|
||||
public string VAT { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Current Door ID
|
||||
/// </summary>
|
||||
public int DoorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Door's parent ID
|
||||
/// </summary>
|
||||
public int ParentId { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
/// </summary>
|
||||
public string DoorExtCode { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Descrizione
|
||||
/// </summary>
|
||||
public string DoorDescript { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Quantity Ordered
|
||||
/// </summary>
|
||||
public int Quantity { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Unit cost for the door
|
||||
/// </summary>
|
||||
public decimal UnitCost { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Unità di misura
|
||||
/// </summary>
|
||||
public string MeasureUnit { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Tipo DoorOP
|
||||
/// </summary>
|
||||
public string ObjectType { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Chiave DoorOP
|
||||
/// </summary>
|
||||
public string ObjectKey { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Valore DoorOp
|
||||
/// </summary>
|
||||
public string ObjectVal { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Quantità DoorOp
|
||||
/// </summary>
|
||||
public int ObjectQty { get; set; } = 1;
|
||||
}
|
||||
}
|
||||
@@ -12,33 +12,17 @@ namespace WebDoorCreator.Data.DbModels
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
[Table("ListValues")]
|
||||
public partial class ListValuesModel
|
||||
[Table("SerializedDoors")]
|
||||
public partial class SerializedDoorsModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[MaxLength(50)]
|
||||
public string TableName { get; set; }
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int DoorTmpId { get; set; }
|
||||
|
||||
public string DoorSerVal { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string FieldName { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string Value { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string Label { get; set; }
|
||||
|
||||
public int Ordinal { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string InputType{ get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string DefaultVal { get; set; }
|
||||
|
||||
[MaxLength(5)]
|
||||
public bool isSerializable { get; set; }
|
||||
public bool Lock { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
@@ -34,10 +34,22 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// RoleId from AspNetUserRoles table
|
||||
/// </summary>
|
||||
public string RoleId { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Name from AspNetRole table
|
||||
/// </summary>
|
||||
public string RoleName { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// ClaimId from AspNetUserRoles table
|
||||
/// </summary>
|
||||
public int ClaimId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// ClaimType from AspNetRole table
|
||||
/// </summary>
|
||||
public string ClaimType { get; set; } = "";
|
||||
/// <summary>
|
||||
/// ClaimValue from AspNetRole table
|
||||
/// </summary>
|
||||
public string ClaimValue { get; set; } = "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,5 +35,9 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
[MaxLength(500)]
|
||||
public string Traduzione { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Indica se è da salvare su db o no
|
||||
/// </summary>
|
||||
public bool IsConfSave { get; set; } = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,8 +69,8 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{
|
||||
Id = "2d778017-0768-47f4-b807-9094d4aa39c7",
|
||||
ConcurrencyStamp = "b83e70eb-09cd-4ac7-8571-c821029ae152",
|
||||
Name = "Admin",
|
||||
NormalizedName = "ADMIN"
|
||||
Name = "DcaAdmin",
|
||||
NormalizedName = "DCAADMIN"
|
||||
},
|
||||
new
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{
|
||||
{ "0bef594b-861c-4c48-b967-c408174074c6", "a470e2f3-6c5e-4123-bf2e-f6f8b4d11328", "Undef", "UNDEF" },
|
||||
{ "2bdc3737-48c3-4340-b55d-1739eec7aede", "980f5e55-80d8-466d-8451-746acfa837d4", "SuperAdmin", "SUPERADMIN" },
|
||||
{ "2d778017-0768-47f4-b807-9094d4aa39c7", "b83e70eb-09cd-4ac7-8571-c821029ae152", "Admin", "ADMIN" },
|
||||
{ "2d778017-0768-47f4-b807-9094d4aa39c7", "b83e70eb-09cd-4ac7-8571-c821029ae152", "DcaAdmin", "DCAADMIN" },
|
||||
{ "585875c2-1787-4c33-aa4d-dfa37ada8766", "0b6d6096-d9b8-4abe-a6b7-4adac55afc37", "CompAdmin", "COMPADMIN" },
|
||||
{ "7444754d-5643-461b-a3c1-aeb8665631d7", "9e3fac4e-50ec-437d-a968-a976ecdc27b5", "CompUser", "COMPUSER" },
|
||||
{ "9c1c4523-526d-4efa-af94-a24cb04312b8", "9ab5dd98-2d81-4baf-b01c-62c0c893c086", "User", "USER" }
|
||||
|
||||
@@ -69,8 +69,8 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{
|
||||
Id = "be0e13af-b32e-490d-b798-36e090e91727",
|
||||
ConcurrencyStamp = "8bf806ed-63c9-4f86-b20e-836296469772",
|
||||
Name = "Admin",
|
||||
NormalizedName = "ADMIN"
|
||||
Name = "DcaAdmin",
|
||||
NormalizedName = "DCAADMIN"
|
||||
},
|
||||
new
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{ "31011aea-c9a3-4f34-a9fd-7b7a4bcbefa6", "32cd475f-bbe2-4940-bfd1-fe26cafd4fae", "Undef", "UNDEF" },
|
||||
{ "a5ab56f6-fba3-434d-b316-e5bac2631411", "22a4245e-1026-4990-97ce-9e4a851b0f23", "CompAdmin", "COMPADMIN" },
|
||||
{ "b904f672-414e-4782-b0a5-30c4a0d952f5", "f5e19beb-0c79-41b7-9dee-9b276454eaf8", "CompUser", "COMPUSER" },
|
||||
{ "be0e13af-b32e-490d-b798-36e090e91727", "8bf806ed-63c9-4f86-b20e-836296469772", "Admin", "ADMIN" },
|
||||
{ "be0e13af-b32e-490d-b798-36e090e91727", "8bf806ed-63c9-4f86-b20e-836296469772", "DcaAdmin", "DCAADMIN" },
|
||||
{ "c9cb6d11-c9a5-43d8-bd04-70be1724ba4a", "07b2ba6d-4f23-43d1-b48c-5b05d14b7e7e", "SuperAdmin", "SUPERADMIN" }
|
||||
});
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{
|
||||
{ "0bef594b-861c-4c48-b967-c408174074c6", "a470e2f3-6c5e-4123-bf2e-f6f8b4d11328", "Undef", "UNDEF" },
|
||||
{ "2bdc3737-48c3-4340-b55d-1739eec7aede", "980f5e55-80d8-466d-8451-746acfa837d4", "SuperAdmin", "SUPERADMIN" },
|
||||
{ "2d778017-0768-47f4-b807-9094d4aa39c7", "b83e70eb-09cd-4ac7-8571-c821029ae152", "Admin", "ADMIN" },
|
||||
{ "2d778017-0768-47f4-b807-9094d4aa39c7", "b83e70eb-09cd-4ac7-8571-c821029ae152", "DcaAdmin", "DCAADMIN" },
|
||||
{ "585875c2-1787-4c33-aa4d-dfa37ada8766", "0b6d6096-d9b8-4abe-a6b7-4adac55afc37", "CompAdmin", "COMPADMIN" },
|
||||
{ "7444754d-5643-461b-a3c1-aeb8665631d7", "9e3fac4e-50ec-437d-a968-a976ecdc27b5", "CompUser", "COMPUSER" },
|
||||
{ "9c1c4523-526d-4efa-af94-a24cb04312b8", "9ab5dd98-2d81-4baf-b01c-62c0c893c086", "User", "USER" }
|
||||
|
||||
@@ -69,8 +69,8 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{
|
||||
Id = "f5f76968-2225-482a-82ac-f54bd05390b3",
|
||||
ConcurrencyStamp = "b54f1873-a97b-4bb1-9e61-7bd2db0a2316",
|
||||
Name = "Admin",
|
||||
NormalizedName = "ADMIN"
|
||||
Name = "DcaAdmin",
|
||||
NormalizedName = "DCAADMIN"
|
||||
},
|
||||
new
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{ "549ec954-a966-484c-8db8-c7d839e8c4af", "84b61e19-8786-45e4-8977-af6466a87878", "User", "USER" },
|
||||
{ "6abfe01f-48f9-4a48-8e49-ac5f29a8753a", "e981295d-29b1-4805-a70e-3c83dc4bcfd7", "CompAdmin", "COMPADMIN" },
|
||||
{ "7fb23328-c054-4b3d-92e0-f949745c8924", "d795b502-0429-4271-a12d-2549f1eb1b17", "Undef", "UNDEF" },
|
||||
{ "f5f76968-2225-482a-82ac-f54bd05390b3", "b54f1873-a97b-4bb1-9e61-7bd2db0a2316", "Admin", "ADMIN" }
|
||||
{ "f5f76968-2225-482a-82ac-f54bd05390b3", "b54f1873-a97b-4bb1-9e61-7bd2db0a2316", "DcaAdmin", "DCAADMIN" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
@@ -122,7 +122,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{ "31011aea-c9a3-4f34-a9fd-7b7a4bcbefa6", "32cd475f-bbe2-4940-bfd1-fe26cafd4fae", "Undef", "UNDEF" },
|
||||
{ "a5ab56f6-fba3-434d-b316-e5bac2631411", "22a4245e-1026-4990-97ce-9e4a851b0f23", "CompAdmin", "COMPADMIN" },
|
||||
{ "b904f672-414e-4782-b0a5-30c4a0d952f5", "f5e19beb-0c79-41b7-9dee-9b276454eaf8", "CompUser", "COMPUSER" },
|
||||
{ "be0e13af-b32e-490d-b798-36e090e91727", "8bf806ed-63c9-4f86-b20e-836296469772", "Admin", "ADMIN" },
|
||||
{ "be0e13af-b32e-490d-b798-36e090e91727", "8bf806ed-63c9-4f86-b20e-836296469772", "DcaAdmin", "DCAADMIN" },
|
||||
{ "c9cb6d11-c9a5-43d8-bd04-70be1724ba4a", "07b2ba6d-4f23-43d1-b48c-5b05d14b7e7e", "SuperAdmin", "SUPERADMIN" }
|
||||
});
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{
|
||||
Id = "0fe4015b-cf98-4229-a120-57eb9c2ca945",
|
||||
ConcurrencyStamp = "ccb4b655-3619-463d-a702-d0c9497e772c",
|
||||
Name = "Admin",
|
||||
NormalizedName = "ADMIN"
|
||||
Name = "DcaAdmin",
|
||||
NormalizedName = "DCAADMIN"
|
||||
},
|
||||
new
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ "0fe4015b-cf98-4229-a120-57eb9c2ca945", "ccb4b655-3619-463d-a702-d0c9497e772c", "Admin", "ADMIN" },
|
||||
{ "0fe4015b-cf98-4229-a120-57eb9c2ca945", "ccb4b655-3619-463d-a702-d0c9497e772c", "DcaAdmin", "DCAADMIN" },
|
||||
{ "1f63e241-4a96-437c-9af9-55748e0f6ed5", "684c9e79-7c20-4e25-ade2-66529980ef38", "Undef", "UNDEF" },
|
||||
{ "34e09fbe-45db-4225-af17-793b4a0f90a1", "3895c7f6-8f63-4c30-9f93-0af0504f5e91", "CompUser", "COMPUSER" },
|
||||
{ "9dfb7941-838f-483e-b1c2-10e01abb3d2d", "15368102-cd08-46cf-a376-dbbc8c6a8f71", "User", "USER" },
|
||||
@@ -135,7 +135,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{ "549ec954-a966-484c-8db8-c7d839e8c4af", "84b61e19-8786-45e4-8977-af6466a87878", "User", "USER" },
|
||||
{ "6abfe01f-48f9-4a48-8e49-ac5f29a8753a", "e981295d-29b1-4805-a70e-3c83dc4bcfd7", "CompAdmin", "COMPADMIN" },
|
||||
{ "7fb23328-c054-4b3d-92e0-f949745c8924", "d795b502-0429-4271-a12d-2549f1eb1b17", "Undef", "UNDEF" },
|
||||
{ "f5f76968-2225-482a-82ac-f54bd05390b3", "b54f1873-a97b-4bb1-9e61-7bd2db0a2316", "Admin", "ADMIN" }
|
||||
{ "f5f76968-2225-482a-82ac-f54bd05390b3", "b54f1873-a97b-4bb1-9e61-7bd2db0a2316", "DcaAdmin", "DCAADMIN" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
|
||||
@@ -69,8 +69,8 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{
|
||||
Id = "4225aeef-4a9b-4629-bbb2-4f3ea6c93595",
|
||||
ConcurrencyStamp = "2a53a882-ccfd-46f5-8c31-04e5945bfc07",
|
||||
Name = "Admin",
|
||||
NormalizedName = "ADMIN"
|
||||
Name = "DcaAdmin",
|
||||
NormalizedName = "DCAADMIN"
|
||||
},
|
||||
new
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ "4225aeef-4a9b-4629-bbb2-4f3ea6c93595", "2a53a882-ccfd-46f5-8c31-04e5945bfc07", "Admin", "ADMIN" },
|
||||
{ "4225aeef-4a9b-4629-bbb2-4f3ea6c93595", "2a53a882-ccfd-46f5-8c31-04e5945bfc07", "DcaAdmin", "DCAADMIN" },
|
||||
{ "7d3b9719-8a33-4790-b0ce-9df3552458f3", "f271ed2d-48dc-4293-b485-15cfb28b3ce7", "Undef", "UNDEF" },
|
||||
{ "7f512221-c37f-438c-920a-76458e217611", "315f6b4a-8700-4ae7-a74b-37a70fbc1c90", "User", "USER" },
|
||||
{ "820b2520-2f28-47cc-8453-ea6871f6e0e6", "0ea8eb3e-972e-4a40-b265-f892335e3db0", "CompUser", "COMPUSER" },
|
||||
@@ -140,7 +140,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ "0fe4015b-cf98-4229-a120-57eb9c2ca945", "ccb4b655-3619-463d-a702-d0c9497e772c", "Admin", "ADMIN" },
|
||||
{ "0fe4015b-cf98-4229-a120-57eb9c2ca945", "ccb4b655-3619-463d-a702-d0c9497e772c", "DcaAdmin", "DCAADMIN" },
|
||||
{ "1f63e241-4a96-437c-9af9-55748e0f6ed5", "684c9e79-7c20-4e25-ade2-66529980ef38", "Undef", "UNDEF" },
|
||||
{ "34e09fbe-45db-4225-af17-793b4a0f90a1", "3895c7f6-8f63-4c30-9f93-0af0504f5e91", "CompUser", "COMPUSER" },
|
||||
{ "9dfb7941-838f-483e-b1c2-10e01abb3d2d", "15368102-cd08-46cf-a376-dbbc8c6a8f71", "User", "USER" },
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ "4225aeef-4a9b-4629-bbb2-4f3ea6c93595", "2a53a882-ccfd-46f5-8c31-04e5945bfc07", "Admin", "ADMIN" },
|
||||
{ "4225aeef-4a9b-4629-bbb2-4f3ea6c93595", "2a53a882-ccfd-46f5-8c31-04e5945bfc07", "DcaAdmin", "DCAADMIN" },
|
||||
{ "7d3b9719-8a33-4790-b0ce-9df3552458f3", "f271ed2d-48dc-4293-b485-15cfb28b3ce7", "Undef", "UNDEF" },
|
||||
{ "7f512221-c37f-438c-920a-76458e217611", "315f6b4a-8700-4ae7-a74b-37a70fbc1c90", "User", "USER" },
|
||||
{ "820b2520-2f28-47cc-8453-ea6871f6e0e6", "0ea8eb3e-972e-4a40-b265-f892335e3db0", "CompUser", "COMPUSER" },
|
||||
|
||||
+2
-2
@@ -62,8 +62,8 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
Id = "851dd9d6-570c-48b0-ac48-e494c5fac5d7",
|
||||
ConcurrencyStamp = "13d724e3-b415-4719-8387-e21952306ce3",
|
||||
Name = "Admin",
|
||||
NormalizedName = "ADMIN"
|
||||
Name = "DcaAdmin",
|
||||
NormalizedName = "DCAADMIN"
|
||||
},
|
||||
new
|
||||
{
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{ "246c1608-059d-4f2b-98b2-f57ab47de3b7", "1b81eff5-4ff6-4756-9bb5-983869fd4b41", "CompAdmin", "COMPADMIN" },
|
||||
{ "695e212d-f79c-45dd-931d-6390c4533c6e", "a4788fda-3f24-41dc-b492-a621de69f031", "SuperAdmin", "SUPERADMIN" },
|
||||
{ "805c6051-0372-4e2b-9b94-f5c8881ef7cb", "a73832bd-be3e-4a48-8b0a-475c8930b4c5", "CompUser", "COMPUSER" },
|
||||
{ "851dd9d6-570c-48b0-ac48-e494c5fac5d7", "13d724e3-b415-4719-8387-e21952306ce3", "Admin", "ADMIN" },
|
||||
{ "851dd9d6-570c-48b0-ac48-e494c5fac5d7", "13d724e3-b415-4719-8387-e21952306ce3", "DcaAdmin", "DCAADMIN" },
|
||||
{ "d0cafb49-7d19-4d4f-a280-6837e5842e8b", "7f94eb48-1f91-4e88-bae6-bb655dba168b", "User", "USER" }
|
||||
});
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{ "246c1608-059d-4f2b-98b2-f57ab47de3b7", "1b81eff5-4ff6-4756-9bb5-983869fd4b41", "CompAdmin", "COMPADMIN" },
|
||||
{ "695e212d-f79c-45dd-931d-6390c4533c6e", "a4788fda-3f24-41dc-b492-a621de69f031", "SuperAdmin", "SUPERADMIN" },
|
||||
{ "805c6051-0372-4e2b-9b94-f5c8881ef7cb", "a73832bd-be3e-4a48-8b0a-475c8930b4c5", "CompUser", "COMPUSER" },
|
||||
{ "851dd9d6-570c-48b0-ac48-e494c5fac5d7", "13d724e3-b415-4719-8387-e21952306ce3", "Admin", "ADMIN" },
|
||||
{ "851dd9d6-570c-48b0-ac48-e494c5fac5d7", "13d724e3-b415-4719-8387-e21952306ce3", "DcaAdmin", "DCAADMIN" },
|
||||
{ "d0cafb49-7d19-4d4f-a280-6837e5842e8b", "7f94eb48-1f91-4e88-bae6-bb655dba168b", "User", "USER" }
|
||||
});
|
||||
}
|
||||
|
||||
+890
@@ -0,0 +1,890 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using WebDoorCreator.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
[DbContext(typeof(WDCDataContext))]
|
||||
[Migration("20230526063309_tryFixSqlErr")]
|
||||
partial class tryFixSqlErr
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetRoles", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUsers", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("AccessFailedCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetUsers", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.CompanyModel", b =>
|
||||
{
|
||||
b.Property<int>("CompanyId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CompanyId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CompanyToken")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<string>("PrivateNote")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("CompanyId");
|
||||
|
||||
b.ToTable("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("chiave")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("note")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valore")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valoreStd")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("chiave");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateLockExpiry")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdLock")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorId");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.HasIndex("TypeId");
|
||||
|
||||
b.ToTable("Door");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtConfirm")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("JsoncActVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("JsoncConfigVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("userConfirm")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorOpId");
|
||||
|
||||
b.HasIndex("DoorId");
|
||||
|
||||
b.ToTable("DoorOp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpTypId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpTypId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DisplayUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtOpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("HwCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HwDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsConcrete")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("JsoncConfig")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentDoorOpId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Rev")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ValidFrom")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("DoorOpTypId");
|
||||
|
||||
b.ToTable("DoorOpType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("TypeId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TypeId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TypeCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("TypeId");
|
||||
|
||||
b.ToTable("DoorType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.GraphicParamsModel", b =>
|
||||
{
|
||||
b.Property<int>("GraphicParamId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("GraphicParamId"), 1L, 1);
|
||||
|
||||
b.Property<int>("compoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("graphicParamAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamDefaultVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamsN")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("GraphicParamId");
|
||||
|
||||
b.ToTable("GraphicParams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.HardwareModel", b =>
|
||||
{
|
||||
b.Property<int>("HardwareId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("HardwareId"), 1L, 1);
|
||||
|
||||
b.Property<string>("compoAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoLayerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("compoTemplateIsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("HardwareId");
|
||||
|
||||
b.ToTable("Hardware");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.LanguageModel", b =>
|
||||
{
|
||||
b.Property<string>("CodLingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("DescrizioneLingua")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("CodLingua");
|
||||
|
||||
b.ToTable("Languages");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
CodLingua = "EN",
|
||||
DescrizioneLingua = "English"
|
||||
},
|
||||
new
|
||||
{
|
||||
CodLingua = "IT",
|
||||
DescrizioneLingua = "Italiano"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValues");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LH",
|
||||
Label = "Left Handed",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RH",
|
||||
Label = "Right Handed",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LHR",
|
||||
Label = "Left Handed Reverse",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RHR",
|
||||
Label = "Right Handed Reverse",
|
||||
Ordinal = 4,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "BV",
|
||||
Label = "Bevel",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "SQ",
|
||||
Label = "Squared",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "1B",
|
||||
Label = "Bull Nose 1",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesTempModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValuesTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.ToTable("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderStatusViewModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("NumDoors")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderStatus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("TotCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.ToView("OrderStatusViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorTmpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorTmpId"), 1L, 1);
|
||||
|
||||
b.Property<string>("DoorSerVal")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Lock")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("DoorTmpId");
|
||||
|
||||
b.ToTable("SerializedDoors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.UsersViewModel", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("RoleName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.ToView("UsersViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("Vocabulary");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyTempModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("VocabularyTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetRoles", "RolesNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetUsers", "UsersNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RolesNav");
|
||||
|
||||
b.Navigation("UsersNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.OrderModel", "OrderNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorTypeModel", "TypeNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("TypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderNav");
|
||||
|
||||
b.Navigation("TypeNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorModel", "DoorNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DoorNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.CompanyModel", "CompanyNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CompanyId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CompanyNav");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class tryFixSqlErr : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+992
@@ -0,0 +1,992 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using WebDoorCreator.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
[DbContext(typeof(WDCDataContext))]
|
||||
[Migration("20230601135441_fixDoorTypeId")]
|
||||
partial class fixDoorTypeId
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetRoles", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUsers", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("AccessFailedCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetUsers", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.CompanyModel", b =>
|
||||
{
|
||||
b.Property<int>("CompanyId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CompanyId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CompanyToken")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<string>("PrivateNote")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("CompanyId");
|
||||
|
||||
b.ToTable("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("chiave")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("note")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valore")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valoreStd")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("chiave");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateLockExpiry")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdLock")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorId");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.ToTable("Door");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtConfirm")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("JsoncActVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("JsoncConfigVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("userConfirm")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorOpId");
|
||||
|
||||
b.HasIndex("DoorId");
|
||||
|
||||
b.ToTable("DoorOp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpTypId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpTypId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DisplayUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtOpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("HwCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HwDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsConcrete")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("JsoncConfig")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentDoorOpId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Rev")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ValidFrom")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("DoorOpTypId");
|
||||
|
||||
b.ToTable("DoorOpType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TypeCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("TypeId");
|
||||
|
||||
b.ToTable("DoorType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.GraphicParamsModel", b =>
|
||||
{
|
||||
b.Property<int>("GraphicParamId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("GraphicParamId"), 1L, 1);
|
||||
|
||||
b.Property<int>("compoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("graphicParamAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamDefaultVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamsN")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("GraphicParamId");
|
||||
|
||||
b.ToTable("GraphicParams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.HardwareModel", b =>
|
||||
{
|
||||
b.Property<int>("HardwareId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("HardwareId"), 1L, 1);
|
||||
|
||||
b.Property<string>("compoAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoLayerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("compoTemplateIsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("HardwareId");
|
||||
|
||||
b.ToTable("Hardware");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.LanguageModel", b =>
|
||||
{
|
||||
b.Property<string>("CodLingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("DescrizioneLingua")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("CodLingua");
|
||||
|
||||
b.ToTable("Languages");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
CodLingua = "EN",
|
||||
DescrizioneLingua = "English"
|
||||
},
|
||||
new
|
||||
{
|
||||
CodLingua = "IT",
|
||||
DescrizioneLingua = "Italiano"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValues");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LH",
|
||||
Label = "Left Handed",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RH",
|
||||
Label = "Right Handed",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LHR",
|
||||
Label = "Left Handed Reverse",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RHR",
|
||||
Label = "Right Handed Reverse",
|
||||
Ordinal = 4,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "BV",
|
||||
Label = "Bevel",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "SQ",
|
||||
Label = "Squared",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "1B",
|
||||
Label = "Bull Nose 1",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesTempModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValuesTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.ToTable("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderStatusViewModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("NumDoors")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderStatus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("TotCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.ToView("v_OrderStatus");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.PrtRepOrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ObjectKey")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ObjectQty")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ObjectType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("OrderId", "DoorId", "ObjectKey");
|
||||
|
||||
b.ToTable("DbSetPrtRepOrder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorTmpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorTmpId"), 1L, 1);
|
||||
|
||||
b.Property<string>("DoorSerVal")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Lock")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("DoorTmpId");
|
||||
|
||||
b.ToTable("SerializedDoors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.UsersViewModel", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("ClaimId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ClaimType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ClaimValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("RoleName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId", "ClaimId");
|
||||
|
||||
b.ToView("v_UserRolesClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("Vocabulary");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyTempModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("VocabularyTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetRoles", "RolesNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetUsers", "UsersNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RolesNav");
|
||||
|
||||
b.Navigation("UsersNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.OrderModel", "OrderNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorModel", "DoorNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DoorNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.CompanyModel", "CompanyNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CompanyId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CompanyNav");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class fixDoorTypeId : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Door_DoorType_TypeId",
|
||||
table: "Door");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Door_TypeId",
|
||||
table: "Door");
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Door_TypeId",
|
||||
table: "Door",
|
||||
column: "TypeId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Door_DoorType_TypeId",
|
||||
table: "Door",
|
||||
column: "TypeId",
|
||||
principalTable: "DoorType",
|
||||
principalColumn: "TypeId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+998
@@ -0,0 +1,998 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using WebDoorCreator.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
[DbContext(typeof(WDCDataContext))]
|
||||
[Migration("20230605061113_AddDeliveryDiscountToOrders")]
|
||||
partial class AddDeliveryDiscountToOrders
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetRoles", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUsers", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("AccessFailedCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetUsers", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.CompanyModel", b =>
|
||||
{
|
||||
b.Property<int>("CompanyId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CompanyId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CompanyToken")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<string>("PrivateNote")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("CompanyId");
|
||||
|
||||
b.ToTable("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("chiave")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("note")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valore")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valoreStd")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("chiave");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateLockExpiry")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdLock")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorId");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.ToTable("Door");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtConfirm")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("JsoncActVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("JsoncConfigVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("userConfirm")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorOpId");
|
||||
|
||||
b.HasIndex("DoorId");
|
||||
|
||||
b.ToTable("DoorOp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpTypId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpTypId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DisplayUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtOpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("HwCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HwDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsConcrete")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("JsoncConfig")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentDoorOpId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Rev")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ValidFrom")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("DoorOpTypId");
|
||||
|
||||
b.ToTable("DoorOpType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TypeCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("TypeId");
|
||||
|
||||
b.ToTable("DoorType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.GraphicParamsModel", b =>
|
||||
{
|
||||
b.Property<int>("GraphicParamId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("GraphicParamId"), 1L, 1);
|
||||
|
||||
b.Property<int>("compoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("graphicParamAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamDefaultVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamsN")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("GraphicParamId");
|
||||
|
||||
b.ToTable("GraphicParams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.HardwareModel", b =>
|
||||
{
|
||||
b.Property<int>("HardwareId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("HardwareId"), 1L, 1);
|
||||
|
||||
b.Property<string>("compoAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoLayerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("compoTemplateIsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("HardwareId");
|
||||
|
||||
b.ToTable("Hardware");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.LanguageModel", b =>
|
||||
{
|
||||
b.Property<string>("CodLingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("DescrizioneLingua")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("CodLingua");
|
||||
|
||||
b.ToTable("Languages");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
CodLingua = "EN",
|
||||
DescrizioneLingua = "English"
|
||||
},
|
||||
new
|
||||
{
|
||||
CodLingua = "IT",
|
||||
DescrizioneLingua = "Italiano"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValues");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LH",
|
||||
Label = "Left Handed",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RH",
|
||||
Label = "Right Handed",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LHR",
|
||||
Label = "Left Handed Reverse",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RHR",
|
||||
Label = "Right Handed Reverse",
|
||||
Ordinal = 4,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "BV",
|
||||
Label = "Bevel",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "SQ",
|
||||
Label = "Squared",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "1B",
|
||||
Label = "Bull Nose 1",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesTempModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValuesTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateDelivery")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("Discount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.ToTable("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderStatusViewModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("NumDoors")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderStatus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("TotCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.ToView("v_OrderStatus");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.PrtRepOrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ObjectKey")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ObjectQty")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ObjectType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("OrderId", "DoorId", "ObjectKey");
|
||||
|
||||
b.ToTable("DbSetPrtRepOrder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorTmpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorTmpId"), 1L, 1);
|
||||
|
||||
b.Property<string>("DoorSerVal")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Lock")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("DoorTmpId");
|
||||
|
||||
b.ToTable("SerializedDoors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.UsersViewModel", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("ClaimId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ClaimType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ClaimValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("RoleName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId", "ClaimId");
|
||||
|
||||
b.ToView("v_UserRolesClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("Vocabulary");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyTempModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("VocabularyTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetRoles", "RolesNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetUsers", "UsersNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RolesNav");
|
||||
|
||||
b.Navigation("UsersNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.OrderModel", "OrderNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorModel", "DoorNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DoorNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.CompanyModel", "CompanyNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CompanyId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CompanyNav");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class AddDeliveryDiscountToOrders : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "DateDelivery",
|
||||
table: "Order",
|
||||
type: "datetime2",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "Discount",
|
||||
table: "Order",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DateDelivery",
|
||||
table: "Order");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Discount",
|
||||
table: "Order");
|
||||
}
|
||||
}
|
||||
}
|
||||
+986
@@ -0,0 +1,986 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using WebDoorCreator.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
[DbContext(typeof(WDCDataContext))]
|
||||
[Migration("20230605063358_deleteDoorType")]
|
||||
partial class deleteDoorType
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetRoles", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUsers", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("AccessFailedCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetUsers", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.CompanyModel", b =>
|
||||
{
|
||||
b.Property<int>("CompanyId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CompanyId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CompanyToken")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<string>("PrivateNote")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("CompanyId");
|
||||
|
||||
b.ToTable("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("chiave")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("note")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valore")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valoreStd")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("chiave");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateLockExpiry")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdLock")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorId");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.ToTable("Door");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtConfirm")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("JsoncActVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("JsoncConfigVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("userConfirm")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorOpId");
|
||||
|
||||
b.HasIndex("DoorId");
|
||||
|
||||
b.ToTable("DoorOp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpTypId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpTypId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DisplayUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtOpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("HwCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HwDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsConcrete")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("JsoncConfig")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentDoorOpId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Rev")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ValidFrom")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("DoorOpTypId");
|
||||
|
||||
b.ToTable("DoorOpType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.GraphicParamsModel", b =>
|
||||
{
|
||||
b.Property<int>("GraphicParamId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("GraphicParamId"), 1L, 1);
|
||||
|
||||
b.Property<int>("compoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("graphicParamAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamDefaultVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamsN")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("GraphicParamId");
|
||||
|
||||
b.ToTable("GraphicParams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.HardwareModel", b =>
|
||||
{
|
||||
b.Property<int>("HardwareId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("HardwareId"), 1L, 1);
|
||||
|
||||
b.Property<string>("compoAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoLayerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("compoTemplateIsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("HardwareId");
|
||||
|
||||
b.ToTable("Hardware");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.LanguageModel", b =>
|
||||
{
|
||||
b.Property<string>("CodLingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("DescrizioneLingua")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("CodLingua");
|
||||
|
||||
b.ToTable("Languages");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
CodLingua = "EN",
|
||||
DescrizioneLingua = "English"
|
||||
},
|
||||
new
|
||||
{
|
||||
CodLingua = "IT",
|
||||
DescrizioneLingua = "Italiano"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValues");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LH",
|
||||
Label = "Left Handed",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RH",
|
||||
Label = "Right Handed",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LHR",
|
||||
Label = "Left Handed Reverse",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RHR",
|
||||
Label = "Right Handed Reverse",
|
||||
Ordinal = 4,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "BV",
|
||||
Label = "Bevel",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "SQ",
|
||||
Label = "Squared",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "1B",
|
||||
Label = "Bull Nose 1",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesTempModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValuesTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateDelivery")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("Discount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.ToTable("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderStatusViewModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateDelivery")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("Discount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("NumDoors")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderStatus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("TotCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.ToView("v_OrderStatus");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.PrtRepOrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ObjectKey")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ObjectQty")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ObjectType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("OrderId", "DoorId", "ObjectKey");
|
||||
|
||||
b.ToTable("DbSetPrtRepOrder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorTmpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorTmpId"), 1L, 1);
|
||||
|
||||
b.Property<string>("DoorSerVal")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Lock")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("DoorTmpId");
|
||||
|
||||
b.ToTable("SerializedDoors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.UsersViewModel", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("ClaimId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ClaimType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ClaimValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("RoleName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId", "ClaimId");
|
||||
|
||||
b.ToView("v_UserRolesClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("Vocabulary");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyTempModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("VocabularyTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetRoles", "RolesNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetUsers", "UsersNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RolesNav");
|
||||
|
||||
b.Navigation("UsersNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.OrderModel", "OrderNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorModel", "DoorNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DoorNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.CompanyModel", "CompanyNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CompanyId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CompanyNav");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class deleteDoorType : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "DoorType");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DoorType",
|
||||
columns: table => new
|
||||
{
|
||||
TypeId = table.Column<int>(type: "int", nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
TypeCode = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DoorType", x => x.TypeId);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
+986
@@ -0,0 +1,986 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using WebDoorCreator.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
[DbContext(typeof(WDCDataContext))]
|
||||
[Migration("20230605064657_nameChangeDoorType")]
|
||||
partial class nameChangeDoorType
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetRoles", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUsers", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("AccessFailedCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetUsers", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.CompanyModel", b =>
|
||||
{
|
||||
b.Property<int>("CompanyId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CompanyId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CompanyToken")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<string>("PrivateNote")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("CompanyId");
|
||||
|
||||
b.ToTable("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("chiave")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("note")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valore")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valoreStd")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("chiave");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateLockExpiry")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorIdParent")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdLock")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorId");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.ToTable("Door");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtConfirm")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("JsoncActVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("JsoncConfigVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("userConfirm")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorOpId");
|
||||
|
||||
b.HasIndex("DoorId");
|
||||
|
||||
b.ToTable("DoorOp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpTypId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpTypId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DisplayUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtOpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("HwCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HwDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsConcrete")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("JsoncConfig")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentDoorOpId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Rev")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ValidFrom")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("DoorOpTypId");
|
||||
|
||||
b.ToTable("DoorOpType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.GraphicParamsModel", b =>
|
||||
{
|
||||
b.Property<int>("GraphicParamId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("GraphicParamId"), 1L, 1);
|
||||
|
||||
b.Property<int>("compoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("graphicParamAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamDefaultVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamsN")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("GraphicParamId");
|
||||
|
||||
b.ToTable("GraphicParams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.HardwareModel", b =>
|
||||
{
|
||||
b.Property<int>("HardwareId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("HardwareId"), 1L, 1);
|
||||
|
||||
b.Property<string>("compoAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoLayerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("compoTemplateIsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("HardwareId");
|
||||
|
||||
b.ToTable("Hardware");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.LanguageModel", b =>
|
||||
{
|
||||
b.Property<string>("CodLingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("DescrizioneLingua")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("CodLingua");
|
||||
|
||||
b.ToTable("Languages");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
CodLingua = "EN",
|
||||
DescrizioneLingua = "English"
|
||||
},
|
||||
new
|
||||
{
|
||||
CodLingua = "IT",
|
||||
DescrizioneLingua = "Italiano"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValues");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LH",
|
||||
Label = "Left Handed",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RH",
|
||||
Label = "Right Handed",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LHR",
|
||||
Label = "Left Handed Reverse",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RHR",
|
||||
Label = "Right Handed Reverse",
|
||||
Ordinal = 4,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "BV",
|
||||
Label = "Bevel",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "SQ",
|
||||
Label = "Squared",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "1B",
|
||||
Label = "Bull Nose 1",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesTempModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValuesTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateDelivery")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("Discount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.ToTable("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderStatusViewModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateDelivery")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("Discount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("NumDoors")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderStatus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("TotCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.ToView("v_OrderStatus");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.PrtRepOrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ObjectKey")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ObjectQty")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ObjectType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("OrderId", "DoorId", "ObjectKey");
|
||||
|
||||
b.ToTable("DbSetPrtRepOrder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorTmpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorTmpId"), 1L, 1);
|
||||
|
||||
b.Property<string>("DoorSerVal")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Lock")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("DoorTmpId");
|
||||
|
||||
b.ToTable("SerializedDoors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.UsersViewModel", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("ClaimId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ClaimType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ClaimValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("RoleName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId", "ClaimId");
|
||||
|
||||
b.ToView("v_UserRolesClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("Vocabulary");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyTempModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("VocabularyTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetRoles", "RolesNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetUsers", "UsersNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RolesNav");
|
||||
|
||||
b.Navigation("UsersNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.OrderModel", "OrderNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorModel", "DoorNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DoorNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.CompanyModel", "CompanyNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CompanyId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CompanyNav");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class nameChangeDoorType : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "TypeId",
|
||||
table: "Door",
|
||||
newName: "DoorIdParent");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DoorIdParent",
|
||||
table: "Door",
|
||||
newName: "TypeId");
|
||||
}
|
||||
}
|
||||
}
|
||||
+982
@@ -0,0 +1,982 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using WebDoorCreator.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
[DbContext(typeof(WDCDataContext))]
|
||||
[Migration("20230605134244_DoorOpTypeUpdate")]
|
||||
partial class DoorOpTypeUpdate
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetRoles", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUsers", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("AccessFailedCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetUsers", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.CompanyModel", b =>
|
||||
{
|
||||
b.Property<int>("CompanyId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CompanyId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CompanyToken")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<string>("PrivateNote")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("CompanyId");
|
||||
|
||||
b.ToTable("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("chiave")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("note")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valore")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valoreStd")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("chiave");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateLockExpiry")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorIdParent")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdLock")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorId");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.ToTable("Door");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtConfirm")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("JsoncActVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("JsoncConfigVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("userConfirm")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorOpId");
|
||||
|
||||
b.HasIndex("DoorId");
|
||||
|
||||
b.ToTable("DoorOp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpTypId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpTypId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DisplayUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtOpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("HwCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HwDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsConcrete")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentDoorOpId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Rev")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<DateTime>("ValidFrom")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("DoorOpTypId");
|
||||
|
||||
b.ToTable("DoorOpType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.GraphicParamsModel", b =>
|
||||
{
|
||||
b.Property<int>("GraphicParamId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("GraphicParamId"), 1L, 1);
|
||||
|
||||
b.Property<int>("compoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("graphicParamAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamDefaultVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamsN")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("GraphicParamId");
|
||||
|
||||
b.ToTable("GraphicParams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.HardwareModel", b =>
|
||||
{
|
||||
b.Property<int>("HardwareId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("HardwareId"), 1L, 1);
|
||||
|
||||
b.Property<string>("compoAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoLayerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("compoTemplateIsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("HardwareId");
|
||||
|
||||
b.ToTable("Hardware");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.LanguageModel", b =>
|
||||
{
|
||||
b.Property<string>("CodLingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("DescrizioneLingua")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("CodLingua");
|
||||
|
||||
b.ToTable("Languages");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
CodLingua = "EN",
|
||||
DescrizioneLingua = "English"
|
||||
},
|
||||
new
|
||||
{
|
||||
CodLingua = "IT",
|
||||
DescrizioneLingua = "Italiano"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValues");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LH",
|
||||
Label = "Left Handed",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RH",
|
||||
Label = "Right Handed",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LHR",
|
||||
Label = "Left Handed Reverse",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RHR",
|
||||
Label = "Right Handed Reverse",
|
||||
Ordinal = 4,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "BV",
|
||||
Label = "Bevel",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "SQ",
|
||||
Label = "Squared",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "1B",
|
||||
Label = "Bull Nose 1",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesTempModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValuesTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateDelivery")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("Discount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.ToTable("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderStatusViewModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateDelivery")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("Discount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("NumDoors")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderStatus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("TotCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.ToView("v_OrderStatus");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.PrtRepOrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ObjectKey")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ObjectQty")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ObjectType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("OrderId", "DoorId", "ObjectKey");
|
||||
|
||||
b.ToTable("DbSetPrtRepOrder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorTmpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorTmpId"), 1L, 1);
|
||||
|
||||
b.Property<string>("DoorSerVal")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Lock")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("DoorTmpId");
|
||||
|
||||
b.ToTable("SerializedDoors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.UsersViewModel", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("ClaimId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ClaimType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ClaimValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("RoleName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId", "ClaimId");
|
||||
|
||||
b.ToView("v_UserRolesClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("Vocabulary");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyTempModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("VocabularyTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetRoles", "RolesNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetUsers", "UsersNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RolesNav");
|
||||
|
||||
b.Navigation("UsersNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.OrderModel", "OrderNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorModel", "DoorNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DoorNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.CompanyModel", "CompanyNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CompanyId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CompanyNav");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class DoorOpTypeUpdate : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "JsoncConfig",
|
||||
table: "DoorOpType");
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "UnitCost",
|
||||
table: "DoorOpType",
|
||||
type: "decimal(18,2)",
|
||||
nullable: false,
|
||||
defaultValue: 0m);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "UnitCost",
|
||||
table: "DoorOpType");
|
||||
|
||||
migrationBuilder.AddColumn<HierarchyId>(
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType",
|
||||
type: "hierarchyid",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "JsoncConfig",
|
||||
table: "DoorOpType",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
}
|
||||
}
|
||||
}
|
||||
+1055
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class DoorOpTypeTempSetup : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "DoorOpTypeTemp",
|
||||
columns: table => new
|
||||
{
|
||||
DoorOpTypId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
OpCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
IsDefault = table.Column<bool>(type: "bit", nullable: false),
|
||||
HasHw = table.Column<bool>(type: "bit", nullable: false),
|
||||
IsConcrete = table.Column<bool>(type: "bit", nullable: false),
|
||||
HwCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
HwDescription = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
DisplayUrl = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
FPath = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
ParentDoorOpId = table.Column<int>(type: "int", nullable: false),
|
||||
UnitCost = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
|
||||
ExtOpCode = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
ExtDescript = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
Rev = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
ValidFrom = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
ValidUntil = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
MaxAllowed = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_DoorOpTypeTemp", x => x.DoorOpTypId);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "DoorOpTypeTemp");
|
||||
}
|
||||
}
|
||||
}
|
||||
+1055
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,99 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class modListValsCharSize : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Label",
|
||||
table: "ListValuesTemp",
|
||||
type: "nvarchar(250)",
|
||||
maxLength: 250,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(50)",
|
||||
oldMaxLength: 50,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Value",
|
||||
table: "ListValuesTemp",
|
||||
type: "nvarchar(250)",
|
||||
maxLength: 250,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(50)",
|
||||
oldMaxLength: 50);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Label",
|
||||
table: "ListValues",
|
||||
type: "nvarchar(250)",
|
||||
maxLength: 250,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(50)",
|
||||
oldMaxLength: 50,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Value",
|
||||
table: "ListValues",
|
||||
type: "nvarchar(250)",
|
||||
maxLength: 250,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(50)",
|
||||
oldMaxLength: 50);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Label",
|
||||
table: "ListValuesTemp",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(250)",
|
||||
oldMaxLength: 250,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Value",
|
||||
table: "ListValuesTemp",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(250)",
|
||||
oldMaxLength: 250);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Label",
|
||||
table: "ListValues",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(250)",
|
||||
oldMaxLength: 250,
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Value",
|
||||
table: "ListValues",
|
||||
type: "nvarchar(50)",
|
||||
maxLength: 50,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(250)",
|
||||
oldMaxLength: 250);
|
||||
}
|
||||
}
|
||||
}
|
||||
+1055
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class repFixTypeId : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ParentDoorOpId",
|
||||
table: "DoorOpType",
|
||||
newName: "ParentId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DoorIdParent",
|
||||
table: "Door",
|
||||
newName: "ParentId");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ParentId",
|
||||
table: "DoorOpType",
|
||||
newName: "ParentDoorOpId");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "ParentId",
|
||||
table: "Door",
|
||||
newName: "DoorIdParent");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+1058
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,26 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class modVocTempModel : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsConfSave",
|
||||
table: "VocabularyTemp",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsConfSave",
|
||||
table: "VocabularyTemp");
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+1080
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class modDoorOpTypeModel2Match : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FileDim",
|
||||
table: "DoorOpTypeTemp",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FileMD5",
|
||||
table: "DoorOpTypeTemp",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "LastMod",
|
||||
table: "DoorOpTypeTemp",
|
||||
type: "datetime2",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FileDim",
|
||||
table: "DoorOpType",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "FileMD5",
|
||||
table: "DoorOpType",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
defaultValue: "");
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "LastMod",
|
||||
table: "DoorOpType",
|
||||
type: "datetime2",
|
||||
nullable: false,
|
||||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FileDim",
|
||||
table: "DoorOpTypeTemp");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FileMD5",
|
||||
table: "DoorOpTypeTemp");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LastMod",
|
||||
table: "DoorOpTypeTemp");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FileDim",
|
||||
table: "DoorOpType");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "FileMD5",
|
||||
table: "DoorOpType");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LastMod",
|
||||
table: "DoorOpType");
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+1078
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,47 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class fixDoorOpTypeModel2Match : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "FileDim",
|
||||
table: "DoorOpTypeTemp",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)");
|
||||
|
||||
migrationBuilder.AlterColumn<long>(
|
||||
name: "FileDim",
|
||||
table: "DoorOpType",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "nvarchar(max)");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "FileDim",
|
||||
table: "DoorOpTypeTemp",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "FileDim",
|
||||
table: "DoorOpType",
|
||||
type: "nvarchar(max)",
|
||||
nullable: false,
|
||||
oldClrType: typeof(long),
|
||||
oldType: "bigint");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -231,10 +231,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
b.Property<int>("ParentId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
@@ -256,8 +256,6 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.HasIndex("TypeId");
|
||||
|
||||
b.ToTable("Door");
|
||||
});
|
||||
|
||||
@@ -332,9 +330,6 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
@@ -347,6 +342,13 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<long>("FileDim")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("FileMD5")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
@@ -364,10 +366,92 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("JsoncConfig")
|
||||
b.Property<DateTime>("LastMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Rev")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<DateTime>("ValidFrom")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("DoorOpTypId");
|
||||
|
||||
b.ToTable("DoorOpType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpTypeTempModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpTypId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpTypId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DisplayUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtOpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<long>("FileDim")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<string>("FileMD5")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("HwCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HwDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsConcrete")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("LastMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
@@ -382,6 +466,9 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<DateTime>("ValidFrom")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
@@ -390,28 +477,7 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
|
||||
b.HasKey("DoorOpTypId");
|
||||
|
||||
b.ToTable("DoorOpType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("TypeId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TypeId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TypeCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("TypeId");
|
||||
|
||||
b.ToTable("DoorType");
|
||||
b.ToTable("DoorOpTypeTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.GraphicParamsModel", b =>
|
||||
@@ -521,8 +587,8 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
@@ -533,8 +599,8 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
@@ -624,8 +690,8 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
@@ -636,8 +702,8 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
@@ -662,12 +728,18 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateDelivery")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("Discount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
@@ -704,9 +776,15 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateDelivery")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("Discount")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<int>("NumDoors")
|
||||
.HasColumnType("int");
|
||||
|
||||
@@ -737,7 +815,110 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.ToView("OrderStatusViewModel");
|
||||
b.ToView("v_OrderStatus");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.PrtRepOrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ObjectKey")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ObjectQty")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ObjectType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("OrderId", "DoorId", "ObjectKey");
|
||||
|
||||
b.ToView("v_PrtReport");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
@@ -767,6 +948,17 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("ClaimId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ClaimType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ClaimValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
@@ -779,9 +971,9 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
b.HasKey("UserId", "RoleId", "ClaimId");
|
||||
|
||||
b.ToView("UsersViewModel");
|
||||
b.ToView("v_UserRolesClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyModel", b =>
|
||||
@@ -814,6 +1006,9 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<bool>("IsConfSave")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
@@ -851,15 +1046,7 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorTypeModel", "TypeNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("TypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderNav");
|
||||
|
||||
b.Navigation("TypeNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
|
||||
@@ -18,7 +18,9 @@ namespace WebDoorCreator.Data
|
||||
builder.HasData(
|
||||
new IdentityRole { Name = "Undef", NormalizedName = "UNDEF" },
|
||||
new IdentityRole { Name = "SuperAdmin", NormalizedName = "SUPERADMIN" },
|
||||
new IdentityRole { Name = "Admin", NormalizedName = "ADMIN" },
|
||||
new IdentityRole { Name = "DcaAdmin", NormalizedName = "DCAADMIN" },
|
||||
new IdentityRole { Name = "DcaOrdMan", NormalizedName = "DCAORDMAN" },
|
||||
new IdentityRole { Name = "DcaProj", NormalizedName = "DCAPROJ" },
|
||||
new IdentityRole { Name = "CompAdmin", NormalizedName = "COMPADMIN" },
|
||||
new IdentityRole { Name = "CompUser", NormalizedName = "COMPUSER" },
|
||||
new IdentityRole { Name = "User", NormalizedName = "USER" }
|
||||
|
||||
@@ -17,11 +17,11 @@ namespace WebDoorCreator.Data.Services
|
||||
/// Init classe
|
||||
/// </summary>
|
||||
/// <param name="configuration"></param>
|
||||
/// <param name="logger"></param>
|
||||
/// <param name="emailSender"></param>
|
||||
/// <param name="redisCacheClient"></param>
|
||||
/// <param name="redisConn"></param>
|
||||
public QueueDataService(IConfiguration configuration, IEmailSender emailSender, IConnectionMultiplexer redisConn)
|
||||
{
|
||||
Log.Info("QueueDataService starting...");
|
||||
_configuration = configuration;
|
||||
_emailSender = emailSender;
|
||||
// setup componenti REDIS
|
||||
@@ -38,6 +38,9 @@ namespace WebDoorCreator.Data.Services
|
||||
// setup canali pub/sub
|
||||
CalcReqPipe = new MessagePipe(redisConn, Constants.CALC_REQ_QUEUE);
|
||||
CalcDonePipe = new MessagePipe(redisConn, Constants.CALC_DONE_QUEUE);
|
||||
// leggo conf speciali
|
||||
vetoRemoveProcSec = _configuration.GetValue<int>("RuntimeOpt:VetoRemoveProcessing");
|
||||
Log.Info("QueueDataService started!");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
@@ -81,9 +84,9 @@ namespace WebDoorCreator.Data.Services
|
||||
----------------------------------*/
|
||||
bool fatto = false;
|
||||
int numDayPre = 30;
|
||||
if (!string.IsNullOrEmpty(_configuration.GetValue<string>("RumtimeOpt:MaxDayCalcCache")))
|
||||
if (!string.IsNullOrEmpty(_configuration.GetValue<string>("RuntimeOpt:MaxDayCalcCache")))
|
||||
{
|
||||
numDayPre = _configuration.GetValue<int>("RumtimeOpt:MaxDayCalcCache");
|
||||
numDayPre = _configuration.GetValue<int>("RuntimeOpt:MaxDayCalcCache");
|
||||
}
|
||||
DateTime dtLimite = DateTime.Now.AddDays(-numDayPre);
|
||||
// recupero elenco di tutti i refresh porte...
|
||||
@@ -595,13 +598,16 @@ namespace WebDoorCreator.Data.Services
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Upsert for single hash record
|
||||
/// Upsert for single hash record in processing
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of DoorId, saveVersNumb</returns>
|
||||
public async Task<long> RequestProcessingUpsert(string doorId, string vers)
|
||||
{
|
||||
RedisKey currKey = new RedisKey(Constants.CALC_REQ_PROC);
|
||||
long numReq = await RedHashUpsert(currKey, doorId, vers);
|
||||
// aggiungo cache veto rimozione da coda processing
|
||||
RedisKey currVetoKey = new RedisKey($"{Constants.CALC_REQ_PROC}:{doorId}");
|
||||
await redisDb.StringSetAsync(currVetoKey, vers, TimeSpan.FromSeconds(vetoRemoveProcSec));
|
||||
return numReq;
|
||||
}
|
||||
|
||||
@@ -644,7 +650,101 @@ namespace WebDoorCreator.Data.Services
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"ResetQueue | REDIS in: {ts.TotalMilliseconds} ms");
|
||||
Log.Debug($"ResetQueue | REDIS EXEC in: {ts.TotalMilliseconds} ms");
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to queue request for specified DoorIdList
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of DoorId, saveVersNumb</returns>
|
||||
public async Task<List<string>> ResetQueueByDoorList(List<string> DoorIdList)
|
||||
{
|
||||
int num2proc = DoorIdList.Count;
|
||||
List<string> listDone = new List<string>();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// cerco le richieste processing
|
||||
RedisKey currKey = new RedisKey(Constants.CALC_REQ_PROC);
|
||||
var rawData = await redisDb.HashGetAllAsync(currKey);
|
||||
foreach (var item in rawData)
|
||||
{
|
||||
// se è nell'elenco...
|
||||
if (DoorIdList.Contains(item.Name.ToString()))
|
||||
{
|
||||
await RequestPendingUpsert(item.Name!, item.Value!);
|
||||
await RequestProcessingRemove(item.Name!);
|
||||
listDone.Add(item.Name.ToString());
|
||||
}
|
||||
}
|
||||
// cerco le richieste con errori
|
||||
currKey = new RedisKey(Constants.CALC_REQ_ERRS);
|
||||
rawData = await redisDb.HashGetAllAsync(currKey);
|
||||
foreach (var item in rawData)
|
||||
{
|
||||
// se è nell'elenco...
|
||||
if (DoorIdList.Contains(item.Name.ToString()))
|
||||
{
|
||||
await RequestPendingUpsert(item.Name!, item.Value!);
|
||||
await RequestErrRemove(item.Name!);
|
||||
listDone.Add(item.Name.ToString());
|
||||
}
|
||||
}
|
||||
// cerco le richieste processed
|
||||
currKey = new RedisKey(Constants.CALC_REQ_DONE);
|
||||
rawData = await redisDb.HashGetAllAsync(currKey);
|
||||
foreach (var item in rawData)
|
||||
{
|
||||
// se è nell'elenco...
|
||||
if (DoorIdList.Contains(item.Name.ToString()))
|
||||
{
|
||||
await RequestPendingUpsert(item.Name!, item.Value!);
|
||||
await RequestDoneRemove(item.Name!);
|
||||
listDone.Add(item.Name.ToString());
|
||||
}
|
||||
}
|
||||
#if false
|
||||
// calcolo eventuali porte NON ancora richieste...
|
||||
foreach (var item in listDone)
|
||||
{
|
||||
DoorIdList.Remove(item);
|
||||
}
|
||||
#endif
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"ResetQueueByDoorList | doors #: {num2proc} --> {DoorIdList.Count} | EXEC in: {ts.TotalMilliseconds} ms");
|
||||
return DoorIdList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset to queue request all processing stuck data (veto check)
|
||||
/// </summary>
|
||||
/// <returns>Boolean, executed</returns>
|
||||
public async Task<bool> ResetQueueProcessing()
|
||||
{
|
||||
bool fatto = false;
|
||||
await Task.Delay(1);
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// cerco le richieste processing
|
||||
RedisKey currKey = new RedisKey(Constants.CALC_REQ_PROC);
|
||||
RedisKey currVetoKey = new RedisKey($"{Constants.CALC_REQ_PROC}:0");
|
||||
var rawData = await redisDb.HashGetAllAsync(currKey);
|
||||
foreach (var item in rawData)
|
||||
{
|
||||
// verifico SE siano senza veto rimozione...
|
||||
currVetoKey = new RedisKey($"{Constants.CALC_REQ_PROC}:{item.Name}");
|
||||
var redisVal = await redisDb.StringGetAsync(currVetoKey);
|
||||
if (!redisVal.HasValue)
|
||||
{
|
||||
await RequestPendingUpsert(item.Name!, item.Value!);
|
||||
await RequestProcessingRemove(item.Name!);
|
||||
fatto = true;
|
||||
}
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"ResetQueueProcessing | REDIS EXEC in: {ts.TotalMilliseconds} ms");
|
||||
return fatto;
|
||||
}
|
||||
|
||||
@@ -784,9 +884,7 @@ namespace WebDoorCreator.Data.Services
|
||||
#region Protected Fields
|
||||
|
||||
protected const string rKeyCalcOreFase = "Check:OreFasi";
|
||||
|
||||
protected const string rKeyFasiAct = "Check:FasiAct";
|
||||
|
||||
protected const string rKeyProjAct = "Check:ProjAct";
|
||||
|
||||
/// <summary>
|
||||
@@ -795,7 +893,6 @@ namespace WebDoorCreator.Data.Services
|
||||
protected const int shortTTL = 60 * 5;
|
||||
|
||||
protected int idxSim = 0;
|
||||
|
||||
protected Random rnd = new Random();
|
||||
|
||||
#endregion Protected Fields
|
||||
@@ -958,11 +1055,8 @@ namespace WebDoorCreator.Data.Services
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static JsonSerializerSettings? JSSettings;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private readonly IEmailSender _emailSender;
|
||||
|
||||
/// <summary>
|
||||
@@ -1018,6 +1112,14 @@ namespace WebDoorCreator.Data.Services
|
||||
get => TimeSpan.FromSeconds(cacheTtlLong * rnd.Next(900, 1100) / 1000);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Durata cache di 24h
|
||||
/// </summary>
|
||||
private TimeSpan MonthLongCache
|
||||
{
|
||||
get => TimeSpan.FromDays(30);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Durata cache lunga (+ perturbazione percentuale +/-10%)
|
||||
/// </summary>
|
||||
@@ -1026,6 +1128,8 @@ namespace WebDoorCreator.Data.Services
|
||||
get => TimeSpan.FromSeconds(cacheTtlLong * 10 * rnd.Next(900, 1100) / 1000);
|
||||
}
|
||||
|
||||
private int vetoRemoveProcSec { get; set; } = 10;
|
||||
|
||||
/// <summary>
|
||||
/// Durata cache di 24h
|
||||
/// </summary>
|
||||
@@ -1033,13 +1137,6 @@ namespace WebDoorCreator.Data.Services
|
||||
{
|
||||
get => TimeSpan.FromHours(24 * 7);
|
||||
}
|
||||
/// <summary>
|
||||
/// Durata cache di 24h
|
||||
/// </summary>
|
||||
private TimeSpan MonthLongCache
|
||||
{
|
||||
get => TimeSpan.FromDays(30);
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
|
||||
@@ -0,0 +1,579 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using StackExchange.Redis;
|
||||
using System.Diagnostics;
|
||||
using System.Security.Claims;
|
||||
using WebDoorCreator.Core;
|
||||
using WebDoorCreator.Data.User;
|
||||
|
||||
namespace WebDoorCreator.Data.Services
|
||||
{
|
||||
public class UserManDataService : IDisposable
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Init classe
|
||||
/// </summary>
|
||||
/// <param name="configuration"></param>
|
||||
/// <param name="redisConnMult"></param>
|
||||
/// <param name="userManager"></param>
|
||||
public UserManDataService(IConfiguration configuration, IConnectionMultiplexer redisConnMult, UserManager<IdentityUser> userManager)
|
||||
{
|
||||
Log.Info("UserManDataService starting...");
|
||||
_configuration = configuration;
|
||||
_userManager = userManager;
|
||||
// Conf cache
|
||||
redisConn = redisConnMult;
|
||||
redisDb = this.redisConn.GetDatabase();
|
||||
|
||||
// json serializer... FIX errore loop circolare https://www.ryadel.com/en/jsonserializationexception-self-referencing-loop-detected-error-fix-entity-framework-asp-net-core/
|
||||
JSSettings = new JsonSerializerSettings()
|
||||
{
|
||||
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
|
||||
};
|
||||
Log.Info("UserManDataService started!");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_userManager?.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua reset dati utente...
|
||||
/// </summary>
|
||||
/// <param name="resetAll">Indica reset completo (anche dati elenco di base)</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> ResetUserDataCache(bool resetAll)
|
||||
{
|
||||
bool fatto = false;
|
||||
RedisValue pattern = new RedisValue($"{Constants.rKeyUsersAll}");
|
||||
if (resetAll)
|
||||
{
|
||||
fatto = await ExecFlushRedisPattern(pattern);
|
||||
}
|
||||
// ora resetto il resto
|
||||
pattern = new RedisValue($"{Constants.rKeyUsersData}:*");
|
||||
fatto = fatto && await ExecFlushRedisPattern(pattern);
|
||||
pattern = new RedisValue($"{Constants.rKeyUsersAll}:*");
|
||||
fatto = fatto && await ExecFlushRedisPattern(pattern);
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dati utente (TUTTI) da REDIS o DB
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<List<IdentityUser>> UserDataGetAll()
|
||||
{
|
||||
string source = "DB";
|
||||
List<IdentityUser> dataResult = new List<IdentityUser>();
|
||||
// cerco da cache
|
||||
string currKey = $"{Constants.rKeyUsersAll}";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string? rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
source = "REDIS";
|
||||
var tempResult = JsonConvert.DeserializeObject<List<IdentityUser>>(rawData);
|
||||
if (tempResult == null)
|
||||
{
|
||||
dataResult = new List<IdentityUser>();
|
||||
}
|
||||
else
|
||||
{
|
||||
dataResult = tempResult;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dataResult = await _userManager.Users.ToListAsync();
|
||||
rawData = JsonConvert.SerializeObject(dataResult, JSSettings);
|
||||
await redisDb.StringSetAsync(currKey, rawData, LongCache);
|
||||
}
|
||||
if (dataResult == null)
|
||||
{
|
||||
dataResult = new List<IdentityUser>();
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"UserDataGetAll | {source} in: {ts.TotalMilliseconds} ms");
|
||||
return dataResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dati utente (singolo da UID)
|
||||
/// </summary>
|
||||
/// <param name="UserId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<UserData> UserDataGetById(string UserId)
|
||||
{
|
||||
string source = "FULL";
|
||||
UserData dataResult = new UserData();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// uso metodi helper protected di base...
|
||||
var userRaw = await UserIdentityById(UserId);
|
||||
var userIdent = new IdentityUser
|
||||
{
|
||||
Id = userRaw.Id,
|
||||
UserName = userRaw.UserName,
|
||||
Email = userRaw.Email,
|
||||
PhoneNumber = userRaw.PhoneNumber,
|
||||
PasswordHash = "*****",
|
||||
EmailConfirmed = userRaw.EmailConfirmed
|
||||
};
|
||||
// cerco ruoli & claims
|
||||
var UserRoles = await UserRolesById(userIdent);
|
||||
var UserClaims = await UserClaimsById(userIdent);
|
||||
// compongo output
|
||||
dataResult = new UserData()
|
||||
{
|
||||
Identity = userIdent,
|
||||
Roles = UserRoles,
|
||||
Claims = UserClaims
|
||||
};
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"UserDataGetById | {source} in: {ts.TotalMilliseconds} ms");
|
||||
return dataResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dati utente (singolo x UserName)
|
||||
/// </summary>
|
||||
/// <param name="UserName"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<UserData> UserDataGetByName(string UserName)
|
||||
{
|
||||
string source = "FULL";
|
||||
UserData dataResult = new UserData();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// uso metodi helper protected di base...
|
||||
var userRaw = await UserIdentityByName(UserName);
|
||||
var userIdent = new IdentityUser
|
||||
{
|
||||
Id = userRaw.Id,
|
||||
UserName = userRaw.UserName,
|
||||
Email = userRaw.Email,
|
||||
PhoneNumber = userRaw.PhoneNumber,
|
||||
PasswordHash = "*****",
|
||||
EmailConfirmed = userRaw.EmailConfirmed
|
||||
};
|
||||
// cerco ruoli & claims
|
||||
var UserRoles = await UserRolesById(userIdent);
|
||||
var UserClaims = await UserClaimsById(userIdent);
|
||||
// compongo output
|
||||
dataResult = new UserData()
|
||||
{
|
||||
Identity = userIdent,
|
||||
Roles = UserRoles,
|
||||
Claims = UserClaims
|
||||
};
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"UserDataGetByName | {source} in: {ts.TotalMilliseconds} ms");
|
||||
return dataResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dati utente (filtrati da searchVal)
|
||||
/// </summary>
|
||||
/// <param name="searchVal"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<UserData>> UserDataGetFilt(string searchVal)
|
||||
{
|
||||
string source = "FULL";
|
||||
List<UserData> dataResult = new List<UserData>();
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
// uso metodi helper protected di base...
|
||||
List<IdentityUser> RawList = await UserIdentityBySearch(searchVal);
|
||||
// conversione
|
||||
var user = RawList.Select(x => new IdentityUser
|
||||
{
|
||||
Id = x.Id,
|
||||
UserName = x.UserName,
|
||||
Email = x.Email,
|
||||
PhoneNumber = x.PhoneNumber,
|
||||
PasswordHash = "*****",
|
||||
EmailConfirmed = x.EmailConfirmed,
|
||||
LockoutEnabled = x.LockoutEnabled,
|
||||
LockoutEnd = x.LockoutEnd,
|
||||
AccessFailedCount = x.AccessFailedCount,
|
||||
ConcurrencyStamp = x.ConcurrencyStamp,
|
||||
NormalizedEmail = x.NormalizedEmail,
|
||||
NormalizedUserName = x.NormalizedUserName,
|
||||
PhoneNumberConfirmed = x.PhoneNumberConfirmed,
|
||||
SecurityStamp = x.SecurityStamp,
|
||||
TwoFactorEnabled = x.TwoFactorEnabled
|
||||
}).ToList();
|
||||
foreach (var item in user)
|
||||
{
|
||||
// cerco ruoli & claims
|
||||
var UserRoles = await UserRolesById(item);
|
||||
var UserClaims = await UserClaimsById(item);
|
||||
|
||||
var newItem = new UserData()
|
||||
{
|
||||
Identity = item,
|
||||
Roles = UserRoles,
|
||||
Claims = UserClaims
|
||||
};
|
||||
dataResult.Add(newItem);
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"UserDataGetFilt | {source} in: {ts.TotalMilliseconds} ms");
|
||||
return dataResult;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
/// <summary>
|
||||
/// TTL da 1 min x cache Redis
|
||||
/// </summary>
|
||||
protected const int shortTTL = 60 * 5;
|
||||
|
||||
protected int idxSim = 0;
|
||||
protected Random rnd = new Random();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Dati utente CLAIMS da REDIS o DB
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task<List<Claim>> UserClaimsById(IdentityUser UserIdent)
|
||||
{
|
||||
string source = "DB";
|
||||
List<Claim> dataResult = new List<Claim>();
|
||||
// cerco da cache
|
||||
string currKey = $"{Constants.rKeyUsersData}:Claims:{UserIdent.Id}";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string? rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
source = "REDIS";
|
||||
var tempResult = JsonConvert.DeserializeObject<List<Claim>>(rawData, new ClaimConverter());
|
||||
if (tempResult != null)
|
||||
{
|
||||
dataResult = tempResult;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var rawResult = await _userManager.GetClaimsAsync(UserIdent);
|
||||
dataResult = rawResult.ToList();
|
||||
rawData = JsonConvert.SerializeObject(dataResult, JSSettings);
|
||||
await redisDb.StringSetAsync(currKey, rawData, LongCache);
|
||||
}
|
||||
if (dataResult == null)
|
||||
{
|
||||
dataResult = new List<Claim>();
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"UserClaimsById | {source} in: {ts.TotalMilliseconds} ms");
|
||||
return dataResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dati utente IDENTITY da REDIS o DB da UID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task<IdentityUser> UserIdentityById(string UserId)
|
||||
{
|
||||
string source = "DB";
|
||||
IdentityUser dataResult = new IdentityUser();
|
||||
// cerco da cache
|
||||
string currKey = $"{Constants.rKeyUsersData}:Identity:{UserId}";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string? rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
source = "REDIS";
|
||||
var tempResult = JsonConvert.DeserializeObject<IdentityUser>(rawData);
|
||||
if (tempResult != null)
|
||||
{
|
||||
dataResult = tempResult;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dataResult = await _userManager.FindByIdAsync(UserId);
|
||||
rawData = JsonConvert.SerializeObject(dataResult, JSSettings);
|
||||
await redisDb.StringSetAsync(currKey, rawData, LongCache);
|
||||
}
|
||||
if (dataResult == null)
|
||||
{
|
||||
dataResult = new IdentityUser();
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"UserIdentityById | {source} in: {ts.TotalMilliseconds} ms");
|
||||
return dataResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dati utente IDENTITY da REDIS o DB per NAME
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task<IdentityUser> UserIdentityByName(string uName)
|
||||
{
|
||||
string source = "DB";
|
||||
IdentityUser dataResult = new IdentityUser();
|
||||
// cerco da cache
|
||||
string currKey = $"{Constants.rKeyUsersData}:UN:{uName}";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string? rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
source = "REDIS";
|
||||
var tempResult = JsonConvert.DeserializeObject<IdentityUser>(rawData);
|
||||
if (tempResult != null)
|
||||
{
|
||||
dataResult = tempResult;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dataResult = await _userManager.FindByNameAsync(uName);
|
||||
rawData = JsonConvert.SerializeObject(dataResult, JSSettings);
|
||||
await redisDb.StringSetAsync(currKey, rawData, LongCache);
|
||||
}
|
||||
if (dataResult == null)
|
||||
{
|
||||
dataResult = new IdentityUser();
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"UserIdentityByName | {source} in: {ts.TotalMilliseconds} ms");
|
||||
return dataResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dati utente IDENTITY in modalità SEARCH da REDIS o DB
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task<List<IdentityUser>> UserIdentityBySearch(string searchVal)
|
||||
{
|
||||
string source = "DB";
|
||||
List<IdentityUser> dataResult = new List<IdentityUser>();
|
||||
// cerco da cache
|
||||
string currKey = $"{Constants.rKeyUsersDataSearch}:{searchVal}";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string? rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
source = "REDIS";
|
||||
var tempResult = JsonConvert.DeserializeObject<List<IdentityUser>>(rawData);
|
||||
if (tempResult != null)
|
||||
{
|
||||
dataResult = tempResult;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var allData = await UserDataGetAll();
|
||||
if (!string.IsNullOrEmpty(searchVal))
|
||||
{
|
||||
dataResult = allData
|
||||
.Where(x => x.NormalizedEmail.Contains(searchVal.ToUpper()) || x.NormalizedUserName.Contains(searchVal.ToUpper())).ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
dataResult = allData;
|
||||
}
|
||||
rawData = JsonConvert.SerializeObject(dataResult, JSSettings);
|
||||
await redisDb.StringSetAsync(currKey, rawData, LongCache);
|
||||
}
|
||||
if (dataResult == null)
|
||||
{
|
||||
dataResult = new List<IdentityUser>();
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"UserIdentityBySearch | {source} in: {ts.TotalMilliseconds} ms");
|
||||
return dataResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dati utente ROLES da REDIS o DB
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task<List<string>> UserRolesById(IdentityUser UserIdent)
|
||||
{
|
||||
string source = "DB";
|
||||
List<string> dataResult = new List<string>();
|
||||
// cerco da cache
|
||||
string currKey = $"{Constants.rKeyUsersData}:Roles:{UserIdent.Id}";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
string? rawData = await redisDb.StringGetAsync(currKey);
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
source = "REDIS";
|
||||
var tempResult = JsonConvert.DeserializeObject<List<string>>(rawData);
|
||||
if (tempResult != null)
|
||||
{
|
||||
dataResult = tempResult;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var rawResult = await _userManager.GetRolesAsync(UserIdent);
|
||||
dataResult = rawResult.ToList();
|
||||
rawData = JsonConvert.SerializeObject(dataResult, JSSettings);
|
||||
await redisDb.StringSetAsync(currKey, rawData, LongCache);
|
||||
}
|
||||
if (dataResult == null)
|
||||
{
|
||||
dataResult = new List<string>();
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Debug($"UserRolesById | {source} in: {ts.TotalMilliseconds} ms");
|
||||
return dataResult;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
private static JsonSerializerSettings? JSSettings;
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private readonly UserManager<IdentityUser> _userManager;
|
||||
|
||||
/// <summary>
|
||||
/// Elenco obj in cache
|
||||
/// </summary>
|
||||
private List<string> cachedDataList = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Durata cache lunga IN SECONDI
|
||||
/// </summary>
|
||||
private int cacheTtlLong = 60 * 5;
|
||||
|
||||
/// <summary>
|
||||
/// Durata cache breve IN SECONDI
|
||||
/// </summary>
|
||||
private int cacheTtlShort = 60 * 1;
|
||||
|
||||
/// <summary>
|
||||
/// Oggetto per connessione a REDIS
|
||||
/// </summary>
|
||||
private IConnectionMultiplexer redisConn = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Oggetto DB redis da impiegare x chiamate R/W
|
||||
/// </summary>
|
||||
private IDatabase redisDb = null!;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
/// <summary>
|
||||
/// Durata cache di 24h
|
||||
/// </summary>
|
||||
private TimeSpan DayLongCache
|
||||
{
|
||||
get => TimeSpan.FromHours(24);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Durata cache lunga (+ perturbazione percentuale +/-10%)
|
||||
/// </summary>
|
||||
private TimeSpan FastCache
|
||||
{
|
||||
get => TimeSpan.FromSeconds(cacheTtlShort * rnd.Next(900, 1100) / 1000);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Durata cache lunga (+ perturbazione percentuale +/-10%)
|
||||
/// </summary>
|
||||
private TimeSpan LongCache
|
||||
{
|
||||
get => TimeSpan.FromSeconds(cacheTtlLong * rnd.Next(900, 1100) / 1000);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Durata cache di 24h
|
||||
/// </summary>
|
||||
private TimeSpan MonthLongCache
|
||||
{
|
||||
get => TimeSpan.FromDays(30);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Durata cache lunga (+ perturbazione percentuale +/-10%)
|
||||
/// </summary>
|
||||
private TimeSpan UltraLongCache
|
||||
{
|
||||
get => TimeSpan.FromSeconds(cacheTtlLong * 10 * rnd.Next(900, 1100) / 1000);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Durata cache di 24h
|
||||
/// </summary>
|
||||
private TimeSpan WeekLongCache
|
||||
{
|
||||
get => TimeSpan.FromHours(24 * 7);
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Esegue flush memoria redis dato pattern
|
||||
/// </summary>
|
||||
/// <param name="pattern"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<bool> ExecFlushRedisPattern(RedisValue pattern)
|
||||
{
|
||||
bool answ = false;
|
||||
var listEndpoints = redisConn.GetEndPoints();
|
||||
foreach (var endPoint in listEndpoints)
|
||||
{
|
||||
//var server = redisConnAdmin.GetServer(listEndpoints[0]);
|
||||
var server = redisConn.GetServer(endPoint);
|
||||
if (server != null)
|
||||
{
|
||||
var keyList = server.Keys(redisDb.Database, pattern);
|
||||
foreach (var item in keyList)
|
||||
{
|
||||
await redisDb.KeyDeleteAsync(item);
|
||||
}
|
||||
// brutalmente rimuovo intero contenuto DB... DANGER
|
||||
//await server.FlushDatabaseAsync();
|
||||
answ = true;
|
||||
}
|
||||
}
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,39 @@
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
|
||||
-- =============================================
|
||||
-- Author: S.E.L.
|
||||
-- Create date: 2023.06.05
|
||||
-- Description: Esecuzione preparazione tab temp x import DoorOpType
|
||||
-- =============================================
|
||||
CREATE PROCEDURE [dbo].[stp_DoorOpType_Import]
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
|
||||
BEGIN tran
|
||||
|
||||
-- effettua merge dati listValues
|
||||
MERGE DoorOpType as tgt
|
||||
USING (SELECT DoorOpTypId,OpCode,[Description],HasHw,IsConcrete,HwCode,HwDescription,FPath,ExtOpCode,ExtDescript,Rev,ValidFrom,ValidUntil,IsDefault,DisplayUrl,MaxAllowed,ParentDoorOpId
|
||||
,UnitCost FROM DoorOpTypeTemp) as src
|
||||
ON tgt.OpCode = src.OpCode
|
||||
WHEN MATCHED THEN
|
||||
UPDATE SET [Description] = src.[Description]
|
||||
, HasHw = src.HasHw
|
||||
, IsConcrete = src.IsConcrete
|
||||
, HwCode = src.HwCode
|
||||
, HwDescription = src.HwDescription
|
||||
|
||||
WHEN NOT MATCHED THEN
|
||||
INSERT (OpCode,[Description],HasHw,IsConcrete,HwCode,HwDescription)
|
||||
VALUES (OpCode,[Description],HasHw,IsConcrete,HwCode,HwDescription);
|
||||
|
||||
COMMIT tran
|
||||
|
||||
END
|
||||
GO
|
||||
@@ -0,0 +1,25 @@
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
|
||||
-- =============================================
|
||||
-- Author: S.E.L.
|
||||
-- Create date: 2023.06.05
|
||||
-- Description: Esecuzione preparazione tab temp x import DoorOpType
|
||||
-- =============================================
|
||||
CREATE PROCEDURE [dbo].[stp_DoorOpType_Prepare]
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
|
||||
BEGIN tran
|
||||
|
||||
-- effettua preparazione tab appoggio
|
||||
TRUNCATE TABLE DoorOpTypeTemp
|
||||
|
||||
COMMIT tran
|
||||
|
||||
END
|
||||
@@ -22,10 +22,14 @@ BEGIN
|
||||
USING (SELECT TableName, FieldName, [Value], Label, Ordinal, InputType, DefaultVal, isSerializable FROM ListValuesTemp) as src
|
||||
ON tgt.TableName = src.TableName AND tgt.FieldName = src.FieldName AND tgt.[value] = src.[value]
|
||||
WHEN MATCHED THEN
|
||||
UPDATE SET [value] = src.[value], DefaultVal = src.DefaultVal
|
||||
UPDATE SET [Label] = src.[Label]
|
||||
, Ordinal = src.Ordinal
|
||||
, DefaultVal = src.DefaultVal
|
||||
, InputType = src.InputType
|
||||
, IsSerializable = src.IsSerializable
|
||||
WHEN NOT MATCHED THEN
|
||||
INSERT (TableName, FieldName, [Value], Label, Ordinal, InputType, DefaultVal, isSerializable)
|
||||
VALUES (TableName, FieldName, [Value], Label, Ordinal, InputType, DefaultVal, isSerializable);
|
||||
INSERT (TableName, FieldName, [Value], [Label], Ordinal, DefaultVal, InputType, isSerializable)
|
||||
VALUES (TableName, FieldName, [Value], [Label], Ordinal, DefaultVal, InputType, isSerializable);
|
||||
|
||||
COMMIT tran
|
||||
|
||||
|
||||
@@ -19,6 +19,11 @@ BEGIN
|
||||
|
||||
-- effettua preparazione tab appoggio
|
||||
TRUNCATE TABLE ListValuesTemp
|
||||
|
||||
---- backup x sicurezza...
|
||||
--DROP TABLE IF EXISTS DoorOpBackup
|
||||
--SELECT * INTO DoorOpBackup
|
||||
--FROM DoorOp
|
||||
|
||||
COMMIT tran
|
||||
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
|
||||
|
||||
/*-- =============================================
|
||||
-- Author: G.A.R.
|
||||
-- Description: Duplicazione composizione ordine (=Doors + DoorOp)
|
||||
|
||||
EXEC dbo.stp_OrderClone 0, 0, 'samuele.locatelli@egalware.com'
|
||||
|
||||
-- Mod. date: 2023.05.31
|
||||
-- =============================================*/
|
||||
CREATE PROCEDURE [dbo].[stp_OrderClone]
|
||||
(
|
||||
@OrderIdSrc INT = 0
|
||||
,@OrderIdDest INT = 0
|
||||
,@UserIdMod NVARCHAR(500)
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
SET NOCOUNT ON;
|
||||
SET XACT_ABORT ON;
|
||||
|
||||
DECLARE @TotRow AS INT;
|
||||
DECLARE @Cursor AS INT = 1;
|
||||
DECLARE @DoorIdNew AS INT;
|
||||
|
||||
DROP TABLE IF EXISTS #tmpDoor
|
||||
|
||||
SELECT ROW_NUMBER() OVER (ORDER BY DoorId) AS Riga, *
|
||||
INTO #TmpDoor
|
||||
FROM dbo.Door
|
||||
WHERE OrderId = @OrderIdSrc
|
||||
|
||||
SET @TotRow = @@ROWCOUNT
|
||||
|
||||
BEGIN TRAN
|
||||
|
||||
WHILE ( @Cursor <= @TotRow )
|
||||
BEGIN
|
||||
|
||||
-- duplico porte...
|
||||
-- SELECT * FROM #TmpDoor WHERE Riga = @Cursor
|
||||
|
||||
INSERT INTO dbo.Door
|
||||
SELECT @OrderIdDest, TypeId, DoorExtCode, DateIns, UserIdIns, GETDATE() AS DateMod, @UserIdMod AS UserIdMod, DoorDescript, Quantity, UnitCost, DateLockExpiry, MeasureUnit, UserIdLock
|
||||
FROM #TmpDoor
|
||||
WHERE Riga = @Cursor
|
||||
|
||||
SET @DoorIdNew = SCOPE_IDENTITY()
|
||||
-- SELECT @DoorIdNew
|
||||
|
||||
-- duplico OP delle porte
|
||||
INSERT INTO dbo.DoorOp
|
||||
SELECT @DoorIdNew, dr.Description, dr.DateIns, dr.UserIdIns, GETDATE() AS DateMod, @UserIdMod AS UserIdMod, dr.JsoncConfigVal, dr.ObjectId, dr.JsoncActVal, dr.DtConfirm, dr.userConfirm
|
||||
FROM #TmpDoor tm
|
||||
INNER JOIN dbo.DoorOp dr ON tm.DoorId = dr.DoorId
|
||||
WHERE tm.Riga = @Cursor
|
||||
|
||||
-- SELECT * FROM dbo.DoorOp WHERE DoorId = @DoorIdNew
|
||||
|
||||
SET @Cursor += 1
|
||||
END
|
||||
|
||||
COMMIT
|
||||
|
||||
END
|
||||
|
||||
|
||||
GO
|
||||
@@ -0,0 +1,42 @@
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
|
||||
/*-- =============================================
|
||||
-- Author: S.E.L.
|
||||
-- Description: Elenco ordini + valorizzazioni da criteri di filtraggio
|
||||
|
||||
EXEC dbo.stp_OrderList_getFilt 0, 0, NULL, NULL
|
||||
|
||||
-- Mod. date: 2023.03.13
|
||||
-- =============================================*/
|
||||
CREATE PROCEDURE [dbo].[stp_OrderList_getFilt]
|
||||
(
|
||||
@CompanyId INT = 0
|
||||
,@OrderStatus INT = 0
|
||||
,@DataFrom DATETIME = NULL
|
||||
,@DataTo DATETIME = NULL
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
SET NOCOUNT ON;
|
||||
|
||||
-- fix periodo SE non fosse specificato
|
||||
SELECT @DataFrom = ISNULL(@DataFrom, '2000-01-01')
|
||||
SELECT @DataTo = ISNULL(@DataTo, '9999-12-31')
|
||||
|
||||
-- Insert statements for procedure here
|
||||
SELECT *
|
||||
FROM dbo.v_OrderStatus
|
||||
WHERE ( CompanyId = @CompanyId OR @CompanyId = 0 )
|
||||
AND ( OrderStatus = @OrderStatus OR @OrderStatus = 0 )
|
||||
AND DateIns BETWEEN @DataFrom AND @DataTo
|
||||
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
-- =============================================
|
||||
-- Author: S.E.L.
|
||||
-- Description: Door Order Report data exploded by OrderId
|
||||
-- Create date: 2023.05.22
|
||||
-- =============================================
|
||||
ALTER PROCEDURE [dbo].[stp_prt_OrderReportExpl]
|
||||
(
|
||||
@OrderId INT = 0
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
SET NOCOUNT ON;
|
||||
-- Insert statements for procedure here
|
||||
|
||||
-- spostato in vista x poter gestire meglio creazione e indicizzazione in EFCore
|
||||
SELECT *
|
||||
FROM v_PrtReport
|
||||
WHERE OrderId = @OrderId
|
||||
|
||||
--SELECT
|
||||
-- ORD.OrderId,
|
||||
-- ORD.CompanyId,
|
||||
-- ORD.OrderExtCode,
|
||||
-- ORD.DateIns,
|
||||
-- ORD.UserIdIns,
|
||||
-- ORD.DateMod,
|
||||
-- ORD.UserIdMod,
|
||||
-- ORD.Status,
|
||||
-- ORD.OrderDescript,
|
||||
-- COM.CompanyExtCode,
|
||||
-- COM.CompanyName,
|
||||
-- COM.Address,
|
||||
-- COM.ZipCode,
|
||||
-- COM.City,
|
||||
-- COM.State,
|
||||
-- COM.VAT,
|
||||
-- DOR.DoorId,
|
||||
-- ROW_NUMBER() OVER ( PARTITION BY DOR.DoorId ORDER BY DOR.DoorId) AS RowDoor, -- mi serve per i totoali sul report
|
||||
-- DOR.DoorIdParent,
|
||||
-- DOR.DoorExtCode,
|
||||
-- DOR.DoorDescript,
|
||||
-- DOR.Quantity,
|
||||
-- DOR.UnitCost,
|
||||
-- DOR.MeasureUnit,
|
||||
-- CASE
|
||||
-- WHEN DOP.ObjectId IN ('Profiles','Size','Swing') THEN 'INFO'
|
||||
-- WHEN DOP.ObjectId IN ('Properties','Finishing') THEN 'OPTIONS'
|
||||
-- --WHEN CHARINDEX('template', DOP.JsoncActVal) > 0 THEN 'HARDWARE'
|
||||
-- ELSE 'HARDWARE' END AS ObjectType,
|
||||
-- DOP.ObjectId as ObjectKey,
|
||||
|
||||
-- CASE
|
||||
-- WHEN DOP.ObjectId = 'Properties' THEN JSON_VALUE(JsoncActVal,'$.Properties.Properties')
|
||||
-- WHEN DOP.ObjectId = 'Finishing' THEN JSON_VALUE(JsoncActVal,'$.Finishing.Finishing')
|
||||
-- WHEN DOP.ObjectId = 'Size' THEN JSON_QUERY(JsoncActVal,'$.Size')
|
||||
-- WHEN DOP.ObjectId = 'Swing' THEN JSON_VALUE(JsoncActVal,'$.Swing.Swing')
|
||||
-- --WHEN DOP.ObjectId = 'Profiles' THEN JSON_QUERY(JsoncActVal,'$.Profiles')
|
||||
-- --WHEN CHARINDEX('template', DOP.JsoncActVal) > 0 THEN 'HARDWARE'
|
||||
-- ELSE DOP.JsoncActVal END AS ObjectVal,
|
||||
-- --DOP.JsoncActVal as ObjectVal,
|
||||
-- 1 as ObjectQty
|
||||
--FROM
|
||||
-- [Order] AS ORD
|
||||
-- INNER JOIN Company AS COM ON ORD.CompanyId = COM.CompanyId
|
||||
-- INNER JOIN Door AS DOR ON ORD.OrderId = DOR.OrderId
|
||||
-- INNER JOIN DoorOp AS DOP ON DOR.DoorId = DOP.DoorId
|
||||
--WHERE
|
||||
-- ORD.OrderId = @OrderId
|
||||
|
||||
|
||||
END
|
||||
|
||||
@@ -1,50 +1,35 @@
|
||||
/****** Object: View [dbo].[v_OrderStatus] Script Date: 17/03/2023 08:48:45 ******/
|
||||
SET ANSI_NULLS ON
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
|
||||
|
||||
CREATE VIEW [dbo].[v_OrderStatus]
|
||||
AS
|
||||
|
||||
WITH cteDoorGroup AS
|
||||
(
|
||||
SELECT OrderId
|
||||
,COUNT(DISTINCT TypeId) AS NumType
|
||||
,SUM(Quantity) AS NumDoors
|
||||
,SUM(Quantity*UnitCost) AS TotCost
|
||||
FROM Door
|
||||
WITH cteDoorGroup
|
||||
AS (
|
||||
SELECT OrderId
|
||||
,COUNT(DISTINCT ParentId) AS NumType
|
||||
,SUM(Quantity) AS NumDoors
|
||||
,SUM(Quantity * UnitCost) AS TotCost
|
||||
FROM dbo.Door
|
||||
GROUP BY OrderId
|
||||
)
|
||||
|
||||
SELECT
|
||||
ord.OrderId
|
||||
)
|
||||
SELECT ord.OrderId
|
||||
,ord.CompanyId
|
||||
,ord.OrderExtCode
|
||||
,ord.DateIns
|
||||
,ord.UserIdIns
|
||||
,ord.DateMod
|
||||
,ord.UserIdMod
|
||||
,ord.STATUS as OrderStatus
|
||||
,ord.STATUS AS OrderStatus
|
||||
,ord.OrderDescript
|
||||
,ISNULL(cte.NumType, 0) AS NumType
|
||||
,ISNULL(cte.NumDoors, 0) AS NumDoors
|
||||
,ISNULL(cte.TotCost, 0) AS TotCost
|
||||
--,dbo.Door.DoorId
|
||||
--,dbo.Door.OrderId
|
||||
--,dbo.Door.TypeId
|
||||
--,dbo.Door.DoorExtCode
|
||||
--,dbo.Door.DateIns
|
||||
--,dbo.Door.UserIdIns
|
||||
--,dbo.Door.DateMod
|
||||
--,dbo.Door.UserIdMod
|
||||
--,dbo.Door.DoorDescript
|
||||
--,dbo.Door.Quantity
|
||||
--,dbo.Door.UnitCost
|
||||
|
||||
FROM dbo.[Order] as ord
|
||||
LEFT OUTER JOIN cteDoorGroup cte ON ord.OrderId = cte.OrderId
|
||||
,ord.DateDelivery
|
||||
,ord.Discount
|
||||
FROM dbo.[Order] AS ord
|
||||
LEFT OUTER JOIN cteDoorGroup AS cte ON ord.OrderId = cte.OrderId
|
||||
GO
|
||||
@@ -0,0 +1,58 @@
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
ALTER VIEW [dbo].[v_PrtReport]
|
||||
AS
|
||||
SELECT
|
||||
ORD.OrderId,
|
||||
ORD.CompanyId,
|
||||
ORD.OrderExtCode,
|
||||
ORD.DateIns,
|
||||
ORD.UserIdIns,
|
||||
ORD.DateMod,
|
||||
ORD.UserIdMod,
|
||||
ORD.Status,
|
||||
ORD.OrderDescript,
|
||||
COM.CompanyExtCode,
|
||||
COM.CompanyName,
|
||||
COM.Address,
|
||||
COM.ZipCode,
|
||||
COM.City,
|
||||
COM.State,
|
||||
COM.VAT,
|
||||
DOR.DoorId,
|
||||
ROW_NUMBER() OVER ( PARTITION BY DOR.DoorId ORDER BY DOR.DoorId) AS RowDoor, -- mi serve per i totoali sul report
|
||||
DOR.DoorIdParent,
|
||||
DOR.DoorExtCode,
|
||||
DOR.DoorDescript,
|
||||
DOR.Quantity,
|
||||
DOR.UnitCost,
|
||||
DOR.MeasureUnit,
|
||||
CASE
|
||||
WHEN DOP.ObjectId IN ('Profiles','Size','Swing') THEN 'INFO'
|
||||
WHEN DOP.ObjectId IN ('Properties','Finishing') THEN 'OPTIONS'
|
||||
--WHEN CHARINDEX('template', DOP.JsoncActVal) > 0 THEN 'HARDWARE'
|
||||
ELSE 'HARDWARE' END AS ObjectType,
|
||||
DOP.ObjectId as ObjectKey,
|
||||
|
||||
CASE
|
||||
WHEN DOP.ObjectId = 'Properties' THEN JSON_VALUE(JsoncActVal,'$.Properties.Properties')
|
||||
WHEN DOP.ObjectId = 'Finishing' THEN JSON_VALUE(JsoncActVal,'$.Finishing.Finishing')
|
||||
WHEN DOP.ObjectId = 'Size' THEN JSON_QUERY(JsoncActVal,'$.Size')
|
||||
WHEN DOP.ObjectId = 'Swing' THEN JSON_VALUE(JsoncActVal,'$.Swing.Swing')
|
||||
--WHEN DOP.ObjectId = 'Profiles' THEN JSON_QUERY(JsoncActVal,'$.Profiles')
|
||||
--WHEN CHARINDEX('template', DOP.JsoncActVal) > 0 THEN 'HARDWARE'
|
||||
ELSE DOP.JsoncActVal END AS ObjectVal,
|
||||
--DOP.JsoncActVal as ObjectVal,
|
||||
1 as ObjectQty
|
||||
FROM
|
||||
[Order] AS ORD
|
||||
INNER JOIN Company AS COM ON ORD.CompanyId = COM.CompanyId
|
||||
INNER JOIN Door AS DOR ON ORD.OrderId = DOR.OrderId
|
||||
INNER JOIN DoorOp AS DOP ON DOR.DoorId = DOP.DoorId
|
||||
GO
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
CREATE VIEW [dbo].[v_UserRolesClaims]
|
||||
AS
|
||||
/*
|
||||
|
||||
|
||||
Mod: 2023.05.26 agg. campi Claims
|
||||
*/
|
||||
|
||||
SELECT
|
||||
NU.Id AS UserId
|
||||
,NU.UserName
|
||||
,NU.Email
|
||||
,ISNULL(UR.RoleId, '') AS RoleId
|
||||
,ISNULL(ANR.Name, '') AS RoleName
|
||||
,UC.Id AS ClaimId
|
||||
,UC.UserId AS ClaimUserId
|
||||
,UC.ClaimType
|
||||
,UC.ClaimValue
|
||||
--,ANR.Id
|
||||
--,ANR.NormalizedName
|
||||
--,ANR.ConcurrencyStamp
|
||||
--,UR.UserId
|
||||
--,NU.NormalizedUserName
|
||||
--,NU.NormalizedEmail
|
||||
--,NU.EmailConfirmed
|
||||
--,NU.PasswordHash
|
||||
--,NU.SecurityStamp
|
||||
--,NU.ConcurrencyStamp AS Expr2
|
||||
--,NU.PhoneNumber
|
||||
--,NU.PhoneNumberConfirmed
|
||||
--,NU.TwoFactorEnabled
|
||||
--,NU.LockoutEnd
|
||||
--,NU.LockoutEnabled
|
||||
--,NU.AccessFailedCount
|
||||
FROM dbo.AspNetRoles ANR
|
||||
INNER JOIN dbo.AspNetUserRoles UR ON ANR.Id = UR.RoleId
|
||||
RIGHT OUTER JOIN dbo.AspNetUsers NU ON UR.UserId = NU.Id
|
||||
LEFT OUTER JOIN dbo.AspNetUserClaims UC ON NU.Id = UC.UserId
|
||||
|
||||
GO
|
||||
@@ -1,41 +0,0 @@
|
||||
/****** Object: View [dbo].[v_UserRolesClaims] Script Date: 17/03/2023 08:48:50 ******/
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
|
||||
CREATE VIEW [dbo].[v_UserRolesClaims]
|
||||
AS
|
||||
SELECT
|
||||
dbo.AspNetUsers.Id AS UserId
|
||||
,dbo.AspNetUsers.UserName
|
||||
,dbo.AspNetUsers.Email
|
||||
,ISNULL(dbo.AspNetUserRoles.RoleId, '') as RoleId
|
||||
,ISNULL(dbo.AspNetRoles.Name, '') as RoleName
|
||||
--,dbo.AspNetRoles.Id
|
||||
--,dbo.AspNetRoles.NormalizedName
|
||||
--,dbo.AspNetRoles.ConcurrencyStamp
|
||||
--,dbo.AspNetUserRoles.UserId
|
||||
--,dbo.AspNetUsers.NormalizedUserName
|
||||
--,dbo.AspNetUsers.NormalizedEmail
|
||||
--,dbo.AspNetUsers.EmailConfirmed
|
||||
--,dbo.AspNetUsers.PasswordHash
|
||||
--,dbo.AspNetUsers.SecurityStamp
|
||||
--,dbo.AspNetUsers.ConcurrencyStamp AS Expr2
|
||||
--,dbo.AspNetUsers.PhoneNumber
|
||||
--,dbo.AspNetUsers.PhoneNumberConfirmed
|
||||
--,dbo.AspNetUsers.TwoFactorEnabled
|
||||
--,dbo.AspNetUsers.LockoutEnd
|
||||
--,dbo.AspNetUsers.LockoutEnabled
|
||||
--,dbo.AspNetUsers.AccessFailedCount
|
||||
--,dbo.AspNetUserClaims.Id AS Expr3
|
||||
--,dbo.AspNetUserClaims.UserId AS Expr4
|
||||
--,dbo.AspNetUserClaims.ClaimType
|
||||
--,dbo.AspNetUserClaims.ClaimValue
|
||||
FROM dbo.AspNetRoles
|
||||
INNER JOIN dbo.AspNetUserRoles ON dbo.AspNetRoles.Id = dbo.AspNetUserRoles.RoleId
|
||||
RIGHT OUTER JOIN dbo.AspNetUsers ON dbo.AspNetUserRoles.UserId = dbo.AspNetUsers.Id
|
||||
--LEFT OUTER JOIN dbo.AspNetUserClaims ON dbo.AspNetUsers.Id = dbo.AspNetUserClaims.UserId
|
||||
GO
|
||||
@@ -0,0 +1,44 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.User
|
||||
{
|
||||
/// <summary>
|
||||
/// Fix Serializzazione Claims x Newtonsoft.Json
|
||||
/// https://stackoverflow.com/questions/28155169/how-to-programmatically-choose-a-constructor-during-deserialization/54645939#54645939
|
||||
/// </summary>
|
||||
public class ClaimConverter : JsonConverter
|
||||
{
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
return (objectType == typeof(System.Security.Claims.Claim));
|
||||
}
|
||||
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
JObject jo = JObject.Load(reader);
|
||||
string type = (string)jo["Type"];
|
||||
string value = (string)jo["Value"];
|
||||
string valueType = (string)jo["ValueType"];
|
||||
string issuer = (string)jo["Issuer"];
|
||||
string originalIssuer = (string)jo["OriginalIssuer"];
|
||||
return new Claim(type, value, valueType, issuer, originalIssuer);
|
||||
}
|
||||
|
||||
public override bool CanWrite
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Newtonsoft.Json;
|
||||
using System.Security.Claims;
|
||||
|
||||
namespace WebDoorCreator.Data.User
|
||||
{
|
||||
/// <summary>
|
||||
/// Classe generalizzaizone identity (user + roles + claims) x gestione semplificata in editing
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class UserData
|
||||
{
|
||||
#region Public Properties
|
||||
public List<Claim> Claims { get; set; } = new List<Claim>();
|
||||
|
||||
public IdentityUser Identity { get; set; } = null!;
|
||||
|
||||
public bool isInactive
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = Identity.LockoutEnd != null && Identity.LockoutEnd > DateTime.Now;
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
public List<string> Roles { get; set; } = new List<string>();
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,6 @@ namespace WebDoorCreator.Data
|
||||
|
||||
public virtual DbSet<CompanyModel> DbSetCompany { get; set; } = null!;
|
||||
public virtual DbSet<DoorModel> DbSetDoor { get; set; } = null!;
|
||||
public virtual DbSet<DoorTypeModel> DbSetDoorType { get; set; } = null!;
|
||||
public virtual DbSet<OrderModel> DbSetOrders { get; set; } = null!;
|
||||
public virtual DbSet<OrderStatusViewModel> DbSetOrderStatus { get; set; } = null!;
|
||||
public virtual DbSet<AspNetRoles> DbSetRoles { get; set; } = null!;
|
||||
@@ -69,6 +68,7 @@ namespace WebDoorCreator.Data
|
||||
public virtual DbSet<ListValuesTempModel> DbSetValuesTemp { get; set; } = null!;
|
||||
|
||||
public virtual DbSet<DoorOpTypeModel> DbSetDoorOpType { get; set; } = null!;
|
||||
public virtual DbSet<DoorOpTypeTempModel> DbSetDoorOpTypeTemp { get; set; } = null!;
|
||||
public virtual DbSet<DoorOpModel> DbSetDoorOp { get; set; } = null!;
|
||||
public virtual DbSet<HardwareModel> DbSetHardware { get; set; } = null!;
|
||||
public virtual DbSet<GraphicParamsModel> DbSetGraphicParams { get; set; } = null!;
|
||||
@@ -77,6 +77,7 @@ namespace WebDoorCreator.Data
|
||||
public virtual DbSet<LanguageModel> DbSetLanguages { get; set; } = null!;
|
||||
public virtual DbSet<SerializedDoorsModel> DbSetSerializedDoors { get; set; } = null!;
|
||||
public virtual DbSet<ConfigModel> DbSetConfig { get; set; } = null!;
|
||||
public virtual DbSet<PrtRepOrderModel> DbSetPrtRepOrder { get; set; } = null!;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -131,13 +132,15 @@ namespace WebDoorCreator.Data
|
||||
modelBuilder.Entity<AspNetUserRoles>().ToTable(nameof(AspNetUserRoles), t => t.ExcludeFromMigrations());
|
||||
|
||||
|
||||
//Creazione viste migrate
|
||||
modelBuilder.Entity<UsersViewModel>().ToView(nameof(UsersViewModel));
|
||||
modelBuilder.Entity<OrderStatusViewModel>().ToView(nameof(OrderStatusViewModel));
|
||||
// Creazione viste migrate
|
||||
modelBuilder.Entity<UsersViewModel>().ToView("v_UserRolesClaims");
|
||||
modelBuilder.Entity<OrderStatusViewModel>().ToView("v_OrderStatus");
|
||||
modelBuilder.Entity<PrtRepOrderModel>().ToView("v_PrtReport");
|
||||
//modelBuilder.Entity<OrderStatusViewModel>().ToView(nameof(OrderStatusViewModel));
|
||||
|
||||
|
||||
modelBuilder.Entity<AspNetUserRoles>().HasKey(c => new { c.UserId, c.RoleId });
|
||||
modelBuilder.Entity<UsersViewModel>().HasKey(c => new { c.UserId, c.RoleId });
|
||||
modelBuilder.Entity<UsersViewModel>().HasKey(c => new { c.UserId, c.RoleId, c.ClaimId });
|
||||
modelBuilder.Entity<ListValuesModel>().HasKey(c => new { c.TableName, c.FieldName, c.Value });
|
||||
modelBuilder.Entity<ListValuesTempModel>().HasKey(c => new { c.TableName, c.FieldName, c.Value });
|
||||
modelBuilder.Entity<VocabularyModel>().HasKey(c => new { c.Lingua, c.Lemma });
|
||||
@@ -161,8 +164,13 @@ namespace WebDoorCreator.Data
|
||||
{
|
||||
modelBuilder.ApplyConfiguration(new ListValuesConfiguration());
|
||||
modelBuilder.ApplyConfiguration(new LanguageConfiguration());
|
||||
|
||||
}
|
||||
|
||||
// modello dati x report ordini
|
||||
modelBuilder.Entity<PrtRepOrderModel>().HasKey(c => new { c.OrderId, c.DoorId, c.ObjectKey});
|
||||
|
||||
|
||||
|
||||
//modelBuilder.Seed();
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
|
||||
@@ -35,12 +35,27 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="SqlScripts\Stored\stp_DoorOpType_Import.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="SqlScripts\Stored\stp_ListVal_Import.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="SqlScripts\Stored\stp_DoorOpType_Prepare.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="SqlScripts\Stored\stp_ListVal_Prepare.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="SqlScripts\Stored\stp_OrderClone.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="SqlScripts\Stored\stp_OrderList_getFilt.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="SqlScripts\Stored\stp_prt_OrderReportExpl.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="SqlScripts\Stored\stp_Voc_Prepare.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
@@ -50,7 +65,10 @@
|
||||
<None Update="SqlScripts\View\OrderStatusView.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="SqlScripts\View\UserView.sql">
|
||||
<None Update="SqlScripts\View\UserRolesClaims.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="SqlScripts\View\PrtReport.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace WebDoorCreator.SDK
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset delel code di processing
|
||||
/// Reset di tutte le code a REQUEST
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ResetQueue()
|
||||
@@ -167,6 +167,15 @@ namespace WebDoorCreator.SDK
|
||||
var rawData = callUrlPost(urlResetQueue, "", parList);
|
||||
return rawData;
|
||||
}
|
||||
/// <summary>
|
||||
/// Reset delle code di processing a REQUEST
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string ResetQueueProcessing()
|
||||
{
|
||||
var rawData = callUrlPost(urlResetQueueProc, "");
|
||||
return rawData;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restitusice l'elenco degli esiti di processing
|
||||
@@ -188,6 +197,7 @@ namespace WebDoorCreator.SDK
|
||||
protected const string urlActLenght = "api/Queue/ActLenght";
|
||||
protected const string urlAlive = "/api/Alive";
|
||||
protected const string urlResetQueue = "api/Queue/ResetQueue";
|
||||
protected const string urlResetQueueProc = "api/Queue/ResetQueueProcessing";
|
||||
protected const string urlSaveProcRes = "api/Queue/SaveProcResult";
|
||||
protected const string urlStatusList = "api/Queue/StatusList";
|
||||
protected const string urlTakeNextItems = "api/Queue/TakeNextItems";
|
||||
|
||||
@@ -73,4 +73,4 @@
|
||||
|
||||
@section Scripts {
|
||||
<partial name="_ValidationScriptsPartial" />
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace WebDoorCreator.UI.Areas.Identity.Pages.Account
|
||||
private async Task CheckSuperAdmin()
|
||||
{
|
||||
//se non ci fosse --> creo samuele come superadmin
|
||||
string superUser = "samuele@steamware.net";
|
||||
string superUser = "zaccaria.majid01@egalware.com";
|
||||
string superPwd = "viaDante16!";
|
||||
string ADMIN_ROLE = "SuperAdmin";
|
||||
var user = await _userManager.FindByEmailAsync(superUser);
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
@page
|
||||
@model RegisterModel
|
||||
@{
|
||||
ViewData["Title"] = "Register";
|
||||
}
|
||||
@inject WebDoorCreator.UI.Data.WDCVocabularyService WDCVService
|
||||
@inject WebDoorCreator.UI.Data.WDCUserService WDCUService
|
||||
@*@{
|
||||
ViewData["Title"] = traduci("UI_10");
|
||||
}*@
|
||||
|
||||
|
||||
<div class="d-flex justify-content-center">
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
<h1>@WDCVService.Traduci(WDCUService.currLanguage ?? "EN" , "UI_100")</h1>
|
||||
</div>
|
||||
|
||||
<div style="
|
||||
@@ -29,8 +31,8 @@
|
||||
<div class="cardRightHeader"></div>
|
||||
<div class="row">
|
||||
<div class="py-3 d-flex justify-content-center align-content-center flex-wrap">
|
||||
<form id="registerForm" asp-route-returnUrl="@Model.ReturnUrl" method="post">
|
||||
<h2 class="text-dark">Create a new account.</h2>
|
||||
<form id="+Form" asp-route-returnUrl="@Model.ReturnUrl" method="post">
|
||||
<h2 class="text-dark">@WDCVService.Traduci(WDCUService.currLanguage ?? "EN" , "UI_101")</h2>
|
||||
<hr />
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
|
||||
<div class="form-floating mb-1">
|
||||
@@ -48,10 +50,10 @@
|
||||
<label asp-for="Input.ConfirmPassword"></label>
|
||||
<span asp-validation-for="Input.ConfirmPassword" class="text-danger"></span>
|
||||
</div>
|
||||
<button id="registerSubmit" type="submit" class="w-100 btn btn-lg btn-dark mb-3">Register</button>
|
||||
<button id="registerSubmit" type="submit" class="w-100 btn btn-lg btn-dark mb-3">@WDCVService.Traduci(WDCUService.currLanguage ?? "EN" , "UI_100")</button>
|
||||
<div>
|
||||
<p>
|
||||
<a id="already-register" asp-page="./Login" class="text-decoration-none text-dark">Already have an account? Click here</a>
|
||||
<a id="already-register" asp-page="./Login" class="text-decoration-none text-dark">@WDCVService.Traduci(WDCUService.currLanguage ?? "EN" , "UI_105") <b>@WDCVService.Traduci(WDCUService.currLanguage ?? "EN" , "UI_106")</b></a>
|
||||
</p>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user