Compare commits
336 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f2d5894638 | |||
| 72a9b30224 | |||
| 5de127b786 | |||
| bda5a45556 | |||
| 544050bed8 | |||
| afd6dcc415 | |||
| a41ba4ed86 | |||
| 1b0e6eff12 | |||
| ece16243ff | |||
| 9228059419 | |||
| 4584f95004 | |||
| 16650e0b25 | |||
| 30f2a040b7 | |||
| b49752c31a | |||
| 1e8ce2315b | |||
| 5aadcb2605 | |||
| 96c58679ff | |||
| 2fcc24f3be | |||
| 99b201eeea | |||
| 5448a9117b | |||
| 49dd1eec6b | |||
| ccf37fec6d | |||
| e69a1b71f7 | |||
| cc8b227378 | |||
| 0ad9bfc322 | |||
| 2f849c2d4e | |||
| 3b120055f7 | |||
| 0f593ef013 | |||
| 0eb1dee91e | |||
| 37eb2ab1cf | |||
| 3085f5bad9 | |||
| 2d55618738 | |||
| c7c7cb5795 | |||
| bd5e60db77 | |||
| 54463ea14d | |||
| b5389ad62a | |||
| 839273f8de | |||
| 102918bf0a | |||
| 15f5f93081 | |||
| d62be83f7e | |||
| 4f5dac3156 | |||
| 01ef886474 | |||
| 42c23db164 | |||
| 998f24719c | |||
| 92cfa01d94 | |||
| f8c6db7902 | |||
| 355de58199 | |||
| fcf6398a5a | |||
| 4605985c85 | |||
| 4216c26747 | |||
| 90eb11e861 | |||
| d6dad0211f | |||
| e51b311203 | |||
| 25ab909477 | |||
| 78361c3c2c | |||
| baecfc96d6 | |||
| 05d1876d09 | |||
| b963104a2b | |||
| 7d6d75d539 | |||
| f9717618af | |||
| a61330abc1 | |||
| c08aa6a95f | |||
| 0c37f7875f | |||
| 71376e4a35 | |||
| 632e2005ee | |||
| c2bd127b64 | |||
| 053b39bb00 | |||
| a3f628f139 | |||
| c2af720d82 | |||
| 6605567a2f | |||
| d9d8994157 | |||
| cdfe383fc3 | |||
| 66f27a9baf | |||
| c23a596868 | |||
| 5be1aedd23 | |||
| 62b232b05e | |||
| 5bc32abc04 | |||
| 98d0cf60ea | |||
| b46d935956 | |||
| dafe55c017 | |||
| 5462c8cca4 | |||
| e4782f62f4 | |||
| 3f2a3b7a51 | |||
| e0d6ab0b0a | |||
| ccd9dca9fe | |||
| 09c55be1e7 | |||
| b3086f52fb | |||
| e8e53d940d | |||
| f9eaa7ccd4 | |||
| 34feb38b27 | |||
| a344f7401d | |||
| f5e7ff1452 | |||
| 178a8843dd | |||
| 6aa7ec80d6 | |||
| 98509a0fa2 | |||
| 24283722c6 | |||
| f49d9fcb0f | |||
| ac8284fcd2 | |||
| 9e8fcec7c0 | |||
| 08e1cad999 | |||
| f758dd3f1b | |||
| 555dae50db | |||
| 3e278c4e93 | |||
| 105d5083cb | |||
| 5457fde893 | |||
| a87711e714 | |||
| 54fb80e33b | |||
| ba0e338253 | |||
| 4de19da582 | |||
| 992165a30c | |||
| 4c72268fc5 | |||
| d102d04d24 | |||
| 899043124d | |||
| 60a8d5e4d0 | |||
| 39e065e584 | |||
| 81bed89059 | |||
| 577c1b8e0e | |||
| 66ac6ed86b | |||
| 34e8385946 | |||
| 9e526aef0b | |||
| 1449647645 | |||
| dbec591520 | |||
| 741af51f7b | |||
| 21b3e699c4 | |||
| bfdc802c90 | |||
| ac3a42eed4 | |||
| ec1e6a616b | |||
| efd23ecae3 | |||
| 05284c34e8 | |||
| 32501a8f38 | |||
| b75e16a221 | |||
| f8b8cf226f | |||
| 5f6d10df44 | |||
| 57cda0d5f7 | |||
| ca10b584e6 | |||
| 3c16090ec0 | |||
| ef3e4f957b | |||
| 5a924c340c | |||
| 0abf7186d1 | |||
| 51259f3c8e | |||
| aabc2b4364 | |||
| cd74c11b58 | |||
| 2055d4efbb | |||
| 9b782af373 | |||
| 2bcd575d00 | |||
| fa747a144d | |||
| 3324cf6d0e | |||
| cf9c1ebe0b | |||
| 9026dd4cf3 | |||
| aa327b3aad | |||
| 94334381fe | |||
| a5f3553186 | |||
| 9facdffb8b | |||
| 13fbeed6b6 | |||
| f000d4c026 | |||
| 37c6a50a59 | |||
| 7e6d7c6f63 | |||
| da6df5746d | |||
| 17316d6a91 | |||
| 8adf4583ea | |||
| 82c118c4c0 | |||
| 0f00d256a4 | |||
| ae43e93437 | |||
| 9c309b08d6 | |||
| 5961177503 | |||
| 01ec5f1f79 | |||
| 6d80b8e365 | |||
| 9522ddc08f | |||
| c468d9d91f | |||
| 52acadda42 | |||
| 4db5acc56f | |||
| aa138a1730 | |||
| b96e26185c | |||
| a25db706fb | |||
| 68edf14b63 | |||
| 1e11207bcb | |||
| a013269d66 | |||
| 8f241b2ff6 | |||
| 10b26de373 | |||
| 17f1bccdcd | |||
| e8485980c7 | |||
| 009dd7b93b | |||
| 92aeac389d | |||
| 58aa71dec7 | |||
| 3b523cd439 | |||
| 3dd39917d5 | |||
| edc3e68694 | |||
| acd41f59df | |||
| fed099d0e1 | |||
| 7e7030922d | |||
| 29e2b138fb | |||
| 3d0b97b019 | |||
| 2ca7a79101 | |||
| dc80de7238 | |||
| 9a167b83bd | |||
| 5b190bfaa8 | |||
| f4ef5b0781 | |||
| 312d350576 | |||
| f4c6cc7322 | |||
| d6055b640e | |||
| e8d9f89e11 | |||
| d62538a395 | |||
| 81bd020ceb | |||
| 8b66602575 | |||
| 0350ac3b9f | |||
| cce404789c | |||
| 000cb17acd | |||
| 07725e03a3 | |||
| 950ffdfefb | |||
| 21fc771292 | |||
| 1e9f2e70a0 | |||
| 59029ee106 | |||
| a26ab41fab | |||
| da423544ed | |||
| c517d130a2 | |||
| a56818a2c8 | |||
| ac115ac7ee | |||
| 43eba22eb3 | |||
| 5cac7224c6 | |||
| 054230143f | |||
| 83fd131287 | |||
| 432edd8a26 | |||
| a8e4709199 | |||
| 2608df99b5 | |||
| cc9ecfe515 | |||
| 11a7b0ae61 | |||
| a32b271f55 | |||
| fd638feb11 | |||
| 9ec5585e6b | |||
| e4f2623a8e | |||
| afc1ff662c | |||
| 9428cbe9d3 | |||
| 4cb28d6096 | |||
| 0bfb7011c3 | |||
| 3c797f50a9 | |||
| a19ec9810c | |||
| 7a9d7d7076 | |||
| 68d4e3e64b | |||
| fdde929b65 | |||
| 15b6ea7178 | |||
| cdb892eb08 | |||
| 153e93010a | |||
| 79081639b0 | |||
| af682e0270 | |||
| a06dab15f2 | |||
| 245d408176 | |||
| 588a31cb00 | |||
| 811c121441 | |||
| 83412394c3 | |||
| 72b762b4b5 | |||
| b66ad4c3c0 | |||
| 00a55e6eb3 | |||
| aac9ef28c6 | |||
| a4175a5681 | |||
| 50323a4939 | |||
| 5cd7e5a144 | |||
| e8830f3993 | |||
| 77ca902e88 | |||
| f022e6d930 | |||
| 67fc5cc549 | |||
| 253f3aefac | |||
| f3c76418eb | |||
| 8fe0517264 | |||
| 850241c70d | |||
| 75e70191ff | |||
| 0f9a08a033 | |||
| f84e913839 | |||
| 40cf14c77b | |||
| 1d844597b6 | |||
| feb41fe576 | |||
| 39d8bf85b9 | |||
| 39601df9e5 | |||
| 96616dcc3e | |||
| 0003c52f28 | |||
| 24f7b5384c | |||
| e46947f764 | |||
| 97e21edf80 | |||
| e3dcbe2b61 | |||
| 2f6f728be4 | |||
| 766db47525 | |||
| 7511b16c6b | |||
| 000eca8057 | |||
| dd30d2cbf6 | |||
| 83dd3bb553 | |||
| 303632843c | |||
| c047f78120 | |||
| 24024ccfb3 | |||
| 6f82912ac5 | |||
| d43338f467 | |||
| a5ba37a2f9 | |||
| 8dc03b168b | |||
| 1eb92662ae | |||
| 7f8d21976f | |||
| d377f1a925 | |||
| b5fb438d5a | |||
| 6e0579e315 | |||
| 067ebdcc84 | |||
| dbbe25027a | |||
| 16468e9daa | |||
| 603966b444 | |||
| 1f51e15bb7 | |||
| f12766047a | |||
| 313871c18d | |||
| 4580483976 | |||
| 4aecdf9074 | |||
| c0c1b180b3 | |||
| 97d2e3f82f | |||
| 9ae5d21216 | |||
| cda829a2e2 | |||
| 970fbd4531 | |||
| 2a85f0eca3 | |||
| 3cbc717749 | |||
| c8ce515ba3 | |||
| 2c2b619854 | |||
| e04e8d939e | |||
| 2ab02fabdd | |||
| aeb9da08cb | |||
| 1d5b1084e4 | |||
| aadb20a45b | |||
| 902b12267c | |||
| acff028e5f | |||
| c9ee7a02fc | |||
| 13b83369ae | |||
| 21f330d1f7 | |||
| 301b0a04e2 | |||
| b899a16bc0 | |||
| 9b80e7b25c | |||
| c10327cdb0 | |||
| 5029d6ef21 | |||
| 89a810ee77 | |||
| 6051750c95 | |||
| 0b7b86b655 | |||
| 387bff34e2 | |||
| aff6a89b73 | |||
| 335557eb7c | |||
| f0405cfbe3 |
+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...
|
||||
- [x] aggiungere calcolo (FAKE) dei prezzi
|
||||
- [x] aggiungere company x ordini (x viste DCA almeno)
|
||||
- [x] gestione modifica descrizione/codice ordini (da p\rte del cliente finale)
|
||||
- [x] aggiunta gestione DCA x conferma prezzi e tempistiche
|
||||
- [x] 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 correttamente 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
|
||||
- [x] gestione calcolo prezzi (fake, random)
|
||||
|
||||
### 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
|
||||
- [x] 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
|
||||
- [x] costruire libreria componenti (ad esempio waiter/loader) da siti di esempio componenti in EgwCoreLib.Razor --> ProgressBar e nuovi Loader
|
||||
|
||||
|
||||
### Top
|
||||
|
||||
Binary file not shown.
@@ -307,6 +307,6 @@ In particular we expect to have some data auto-calculated (ex time from CAM), wh
|
||||
|
||||
| Date | Edit | Version | Note |
|
||||
|------------|----------------|:-------:|-----------------:|
|
||||
| 2022.11.09 | S.E. Locatelli | 0.2 | Draft completion |
|
||||
| 2022.11.03 | S.E. Locatelli | 0.1 | Initial draft |
|
||||
| 2023.03.21 | Z. Majid | 0.4 | Grammar Fixes |
|
||||
| 2022.11.09 | S.E. Locatelli | 0.2 | Draft completion |
|
||||
| 2023.03.21 | Z. Majid | 0.4 | Grammar Fixes |
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,58 @@
|
||||
# Appunti fix vari
|
||||
|
||||
La sistemazione è gestita direttametne con commit git...
|
||||
## Traduzione
|
||||
|
||||
Ci sono ancora lemmi di interfaccia gestiti come numerici, NON è lo standard definito:
|
||||
- ok a lemmi "UI_"
|
||||
- lemmi devono essere "self explaining"
|
||||
- eventualmente nel naming il cosa/dove, accettabile **UI_BtnOk** o **UI_BtnKo**, ma anche **UI_OrderPage_title**
|
||||
|
||||
... da sistemare GLOBALMENTE (= Zac...) x gli esistenti, mi occupo di creare correttamente solo i nuovi...
|
||||
|
||||
## NavMenuHorizontal
|
||||
|
||||
|
||||
Ci sono alcne cose che non funzionano:
|
||||
|
||||
|
||||
- i pulsanti si disallineano (icona/testo) con size schermo sotto fhd (va gestito almeno da 1376 in orizzontale...)
|
||||
|
||||

|
||||
- typo: flex warp indica che la pagina deve caricarsi a velocità warp (superluminare) come in star trek? MAGARI!!!!
|
||||
|
||||
```csharp
|
||||
<AuthorizeView Roles="SuperAdmin" Context="MenuHide">
|
||||
<Authorized>
|
||||
<div class="nav-item px-3 d-flex flex-warp align-items-center">
|
||||
<NavLink class="nav-link" href="TemplateMan">
|
||||
<span class="fa-solid fa-paint-roller pe-2" aria-hidden="true"></span> Template Management
|
||||
</NavLink>
|
||||
</div>
|
||||
</Authorized>
|
||||
</AuthorizeView>
|
||||
```
|
||||
- il navbar toggler che non funziona...
|
||||
- opzioni utente con username (email) x esteso: troppo grande, ridotto
|
||||
|
||||
## Modale Door
|
||||
|
||||
La pagina modale della porta permetteva sia la modifica imperativa delle quantità che la modifica del resto gestita tramite controllo CurrDoor / CurrDoorClone per approvare/annullare intervento complessivo
|
||||
|
||||
Questo portava ad una situazione di errore in caso di modifica (es descrizioen door) + modifica quantità
|
||||
|
||||
Eliminato metodo esplicito modifica quantità (da service + DB), gestito come modifica "locale" del dato qta (che quindi eredita il controllo qty >=0)
|
||||
|
||||
## Modale Ordini
|
||||
|
||||
- Aggiunta modale x editing ordine cliente
|
||||
- Aggiunta modale x gestione editing DCA (data consegna...)
|
||||
|
||||
## HwSingleInstance
|
||||
|
||||
La gestione del calcolo "variato" non funziona bene/sempre
|
||||
- errori in fase di calcolo
|
||||
- usare funzione come check è sub ottimale
|
||||
- i valori creati x clone NON sono veri cloni (di fatto punta ad obj originali)
|
||||
|
||||
--> riscritta logica vaori originali/correnti ed editing...
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
Per sistemare il manuale da ilias copiare il file delos.css qui allegato in
|
||||
|
||||
C:\Users\samuele.steamw\source\WebDoorCreator\WebDoorCreator.UI\wwwroot\help\templates\default
|
||||
+20127
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>WebDoorCreator - Egalware</i>
|
||||
<h4>Version: 0.9.2305.2612</h4>
|
||||
<h4>Version: 0.9.2401.0415</h4>
|
||||
<br /> Release note:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.9.2305.2612
|
||||
0.9.2401.0415
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>0.9.2305.2612</version>
|
||||
<version>0.9.2401.0415</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,8 +1,14 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NLog;
|
||||
using SkiaSharp;
|
||||
using Svg;
|
||||
using Svg.Skia;
|
||||
using System.Drawing;
|
||||
using WebDoorCreator.Data.Services;
|
||||
#if false
|
||||
using SkiaSharp;
|
||||
using Svg.Skia;
|
||||
#endif
|
||||
|
||||
namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
@@ -31,6 +37,7 @@ namespace WebDoorCreator.API.Controllers
|
||||
return "OK";
|
||||
}
|
||||
|
||||
|
||||
[HttpGet("GetImage.png")]
|
||||
public async Task<IActionResult> GetImagePng(int DoorId)
|
||||
{
|
||||
@@ -38,10 +45,27 @@ namespace WebDoorCreator.API.Controllers
|
||||
string svgContent = await QDataServ.DoorGetLastSvg(DoorId);
|
||||
if (!string.IsNullOrEmpty(svgContent))
|
||||
{
|
||||
var mySvg = SvgDocument.FromSvg<SvgDocument>(svgContent);
|
||||
//result = System.Text.Encoding.UTF8.GetBytes(svgContent);
|
||||
var myBmp = mySvg.Draw();
|
||||
result = ImageToByte2(myBmp);
|
||||
using (var svg = new SKSvg())
|
||||
{
|
||||
if (svg.FromSvg(svgContent) is { })
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
svg.Picture?.ToImage(stream, SKColors.Empty, SKEncodedImageFormat.Png, 100, 1f, 1f, SKColorType.Rgba8888, SKAlphaType.Unpremul, SKColorSpace.CreateSrgb());
|
||||
result = stream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
#if false
|
||||
var mySvg = SvgDocument.FromSvg<SvgDocument>(svgContent);
|
||||
//result = System.Text.Encoding.UTF8.GetBytes(svgContent);
|
||||
var myBmp = mySvg.Draw();
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
img.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
|
||||
result= stream.ToArray();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return File(result, "image/png");
|
||||
}
|
||||
@@ -72,15 +96,8 @@ namespace WebDoorCreator.API.Controllers
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private byte[] ImageToByte2(Image img)
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
img.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
|
||||
return stream.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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,84 @@ 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);
|
||||
if (doorsList != null)
|
||||
{
|
||||
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();
|
||||
|
||||
@@ -11,11 +11,12 @@ namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public QueueController(IConfiguration configuration, QueueDataService DataService)
|
||||
public QueueController(IConfiguration configuration, QueueDataService DataService, WebDoorCreatorService _WDService)
|
||||
{
|
||||
Log.Info("Starting QueueController");
|
||||
_configuration = configuration;
|
||||
QDataServ = DataService;
|
||||
WDService = _WDService;
|
||||
Log.Info("Avviato QueueController");
|
||||
}
|
||||
|
||||
@@ -89,6 +90,33 @@ namespace WebDoorCreator.API.Controllers
|
||||
public async Task<string> ResetQueueProcessing()
|
||||
{
|
||||
string answ = "NA";
|
||||
// fixme todo
|
||||
|
||||
/* --------------
|
||||
* da riscrivere
|
||||
* - server record x cancellazione logica delle porte OK
|
||||
* - il record (boolean, toDelete...) indica azione richiesta OK
|
||||
* - si prendono TUTTE le porte da DB con toDelete == true OK
|
||||
* - si eliminano su REDIS dalle 4 code (req, processing, error, done) OK
|
||||
* - check delle code processing, SE ci sono record rimasti li cerco sul DB
|
||||
* - se NON ci sono sul db --> li elimino da processing
|
||||
* - effettivo delete sul db di toDelete
|
||||
*
|
||||
* - proseguo come ora (sposto tra code processing --> request)
|
||||
*/
|
||||
|
||||
var doors2Del = await WDService.DoorGet2Del();
|
||||
|
||||
if (doors2Del != null)
|
||||
{
|
||||
foreach (var item in doors2Del)
|
||||
{
|
||||
await WDService.RedisBulkDelByDoorId(item.DoorId);
|
||||
await QDataServ.RedisBulkDelHashByKey(item.DoorId);
|
||||
await WDService.DoorDelete(item);
|
||||
}
|
||||
}
|
||||
|
||||
bool fatto = await QDataServ.ResetQueueProcessing();
|
||||
answ = fatto ? "OK" : "NO";
|
||||
return answ;
|
||||
@@ -156,6 +184,7 @@ namespace WebDoorCreator.API.Controllers
|
||||
#region Private Properties
|
||||
|
||||
private QueueDataService QDataServ { get; set; } = null!;
|
||||
private WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
|
||||
@@ -16,8 +16,11 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
ConfigurationManager configuration = builder.Configuration;
|
||||
// Redis
|
||||
var connStringRedis = configuration.GetConnectionString("Redis");
|
||||
if (string.IsNullOrEmpty(connStringRedis))
|
||||
{
|
||||
connStringRedis = "localhost:6379, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false";
|
||||
}
|
||||
string redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"));
|
||||
|
||||
// avvio oggetto shared x redis...
|
||||
var redisMultiplexer = ConnectionMultiplexer.Connect(connStringRedis);
|
||||
|
||||
|
||||
@@ -1,23 +1,14 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:33043",
|
||||
"sslPort": 44387
|
||||
}
|
||||
},
|
||||
{
|
||||
"profiles": {
|
||||
"WebDoorCreator.API": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://localhost:7043;http://localhost:5240",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "https://localhost:7043;http://localhost:5240"
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
@@ -26,6 +17,25 @@
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"WSL": {
|
||||
"commandName": "WSL2",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "https://localhost:7043/swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"ASPNETCORE_URLS": "https://localhost:7043;http://localhost:5240"
|
||||
},
|
||||
"distributionName": ""
|
||||
}
|
||||
},
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:33043",
|
||||
"sslPort": 44387
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>36a4225d-c8d7-4b97-b6db-6ab2af37bfde</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -18,14 +19,17 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="NLog" Version="5.1.2" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.6.96" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="NLog" Version="5.2.2" />
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.3" />
|
||||
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.3" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.AspNetCore" Version="9.1.0" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.Core" Version="9.1.0" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.Newtonsoft" Version="9.1.0" />
|
||||
<PackageReference Include="Svg" Version="3.4.4" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
|
||||
<PackageReference Include="Svg.Skia" Version="1.0.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Redis": "nkcredis.steamware.net:6379, DefaultDatabase=12, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
|
||||
"WDC.DB": "Server=SQL2016PROD;Database=DCA_WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;"
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@
|
||||
"ProjCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com",
|
||||
"TimbCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com"
|
||||
},
|
||||
"RumtimeOpt": {
|
||||
"RuntimeOpt": {
|
||||
"VetoRemoveProcessing": 5
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,8 @@ namespace WebDoorCreator.Core
|
||||
public static readonly string CALC_REQ_PROC = $"{BASE_HASH}:CalcRequests:Processing";
|
||||
public static readonly string CALC_REQ_DDF_CACHE = $"{BASE_HASH}:CalcRequests:CacheDDF";
|
||||
public static readonly string CALC_REQ_SVG_CACHE = $"{BASE_HASH}:CalcRequests:CacheSVG";
|
||||
public static readonly string DOOR_TPL_LIST = $"{BASE_HASH}:Template:DoorList";
|
||||
|
||||
|
||||
// REDIS Channels messaggi x QueueMan (verso UI/srv)
|
||||
public static readonly string CALC_REQ_QUEUE = $"CalcRequest";
|
||||
@@ -45,12 +47,23 @@ 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";
|
||||
public const string rKeyDirsScan = $"{redisBaseAddr}:Cache:Scan";
|
||||
|
||||
/// <summary>
|
||||
/// variabili accessorie ulteriori
|
||||
/// </summary>
|
||||
public const int StatusIdTemplate = 10000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{
|
||||
#region Public Enums
|
||||
|
||||
|
||||
|
||||
|
||||
public enum UserLevel
|
||||
{
|
||||
@@ -32,6 +32,14 @@
|
||||
CodeDescending
|
||||
}
|
||||
|
||||
public enum fileStatus
|
||||
{
|
||||
none = 0,
|
||||
add,
|
||||
mod,
|
||||
rem
|
||||
}
|
||||
|
||||
#endregion Public Enums
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,9 @@ namespace WebDoorCreator.Core.ReportViewer
|
||||
{
|
||||
public class ReportItem
|
||||
{
|
||||
public string Description { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
public int Qty { get; set; }
|
||||
public string Description { get; set; } = "";
|
||||
public decimal Price { get; set; } = 0;
|
||||
public int Qty { get; set; } = 0;
|
||||
public decimal Total => Price * Qty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,9 +15,8 @@
|
||||
</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="NLog" Version="5.2.2" />
|
||||
<PackageReference Include="ReportViewerCore.NETCore" Version="15.1.17" />
|
||||
<PackageReference Include="ToDataTable" Version="0.1.2" />
|
||||
<PackageReference Include="YamlDotNet" Version="13.1.0" />
|
||||
|
||||
@@ -3,6 +3,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NLog;
|
||||
using NLog.Fluent;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace WebDoorCreator.Data
|
||||
{
|
||||
@@ -13,13 +14,16 @@ namespace WebDoorCreator.Data
|
||||
private IConfiguration _configuration { get; set; } = null!;
|
||||
public ApplicationDbContext()
|
||||
{
|
||||
Log.Info($"ApplicationDbContext Init");
|
||||
try
|
||||
{
|
||||
// se non ci fosse... crea o migra!
|
||||
Database.Migrate();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{ }
|
||||
{
|
||||
Log.Error($"Exc during ApplicationDbContext() init:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options, IConfiguration configuration) : base(options)
|
||||
{
|
||||
@@ -34,7 +38,9 @@ namespace WebDoorCreator.Data
|
||||
Database.Migrate();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{ }
|
||||
{
|
||||
Log.Error($"Exc during ApplicationDbContext(DbContextOptions<ApplicationDbContext> options, IConfiguration configuration) init:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
}
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
|
||||
@@ -21,11 +21,11 @@ namespace WebDoorCreator.Data
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
protected ConfigModel seedConfig(string chaive, string valore, string valoreStd, string note)
|
||||
protected ConfigModel seedConfig(string chiave, string valore, string valoreStd, string note)
|
||||
{
|
||||
var newRec = new ConfigModel()
|
||||
{
|
||||
chiave = chaive,
|
||||
chiave = chiave,
|
||||
valore = valore,
|
||||
valoreStd = valoreStd,
|
||||
note = note
|
||||
|
||||
@@ -21,59 +21,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <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>
|
||||
/// Adding a new company
|
||||
/// </summary>
|
||||
@@ -248,6 +195,60 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Getting door list 2 delete
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DoorModel>? DoorGet2Del()
|
||||
{
|
||||
List<DoorModel>? dbResult = new List<DoorModel>();
|
||||
// retrieving data from db
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// extracting entire set
|
||||
dbResult = localDbCtx.DbSetDoor
|
||||
.Where(x => x.isLogicDel)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in DoorGet2Del:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <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>
|
||||
@@ -282,52 +283,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return newId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding or removing a single door
|
||||
/// </summary>
|
||||
/// <param name="doorId">Record id to edit or add</param>
|
||||
/// <param name="isAdd">States if it has to be added or removing a door</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorModQty(int NewQty, int doorId, bool isAdd)
|
||||
{
|
||||
/* crea nuovo metodo per modifica singola quantità porta: DOORMODQTY */
|
||||
bool fatto = false;
|
||||
//List<ItemModel> dbResult = new List<ItemModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoor
|
||||
.Where(x => x.DoorId == doorId)
|
||||
.FirstOrDefault();
|
||||
if (currRec != null) //if is not null edit the record found
|
||||
{
|
||||
if (NewQty > 0)
|
||||
{
|
||||
currRec.Quantity = NewQty;
|
||||
}
|
||||
else if (isAdd)
|
||||
{
|
||||
currRec.Quantity = currRec.Quantity + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
currRec.Quantity = currRec.Quantity - 1;
|
||||
}
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorModQty: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete doorOp instance
|
||||
/// </summary>
|
||||
@@ -496,6 +451,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>
|
||||
/// Adding a new DoorOpType
|
||||
/// </summary>
|
||||
@@ -547,6 +541,31 @@ namespace WebDoorCreator.Data.Controllers
|
||||
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()
|
||||
{
|
||||
List<DoorOpTypeModel> dbResult = new List<DoorOpTypeModel>();
|
||||
@@ -568,6 +587,117 @@ 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>
|
||||
/// 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>
|
||||
/// Update door's OP
|
||||
/// </summary>
|
||||
@@ -623,7 +753,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();
|
||||
@@ -652,7 +781,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoor
|
||||
.Include(o => o.OrderNav)
|
||||
.Include(t => t.TypeNav)
|
||||
.OrderByDescending(x => x.DoorId)
|
||||
.Take(numRec)
|
||||
.AsNoTracking()
|
||||
@@ -666,6 +794,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>
|
||||
@@ -683,12 +848,19 @@ 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;
|
||||
currRec.isLogicDel = addEditRec.isLogicDel;
|
||||
currRec.UnitCost = addEditRec.UnitCost;
|
||||
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
|
||||
@@ -730,7 +902,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>
|
||||
@@ -753,14 +925,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)
|
||||
{
|
||||
@@ -820,10 +990,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
|
||||
@@ -832,16 +1002,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();
|
||||
@@ -852,6 +1081,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
var rawData = dbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.OrderId == orderId)
|
||||
.Include(c => c.CompanyNav)
|
||||
.AsNoTracking()
|
||||
.FirstOrDefault();
|
||||
if (rawData != null)
|
||||
@@ -932,13 +1162,83 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updating an order code/description
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="newCode"></param>
|
||||
/// <param name="newDescript"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> OrderUpdateDescript(int orderId, string newCode, string newDescript)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.OrderId == orderId)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.OrderExtCode = newCode;
|
||||
currRec.OrderDescript = newDescript;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderUpdateDescript: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updating an order promised date
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="dateProm"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> OrderUpdatePromDate(int orderId, DateTime dateProm)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.OrderId == orderId)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.DateProm = dateProm;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderUpdatePromDate: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updating an order status
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="newStatus"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> OrderUpdate(int orderId, int newStatus)
|
||||
public async Task<bool> OrderUpdateStatus(int orderId, int newStatus)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
@@ -953,6 +1253,19 @@ namespace WebDoorCreator.Data.Controllers
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.Status = newStatus;
|
||||
// controllo gli stati speciali...
|
||||
if (newStatus == 10)
|
||||
{
|
||||
currRec.DateOrd = DateTime.MinValue;
|
||||
}
|
||||
else if (newStatus == 40)
|
||||
{
|
||||
currRec.DateOrd = DateTime.Now;
|
||||
}
|
||||
else if (newStatus == 70)
|
||||
{
|
||||
currRec.DateDelivery = DateTime.Now;
|
||||
}
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
@@ -960,7 +1273,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderUpdate: {Environment.NewLine}{exc}");
|
||||
Log.Error($"Eccezione durante OrderUpdateStatus: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
@@ -1095,6 +1408,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>
|
||||
@@ -1205,6 +1571,33 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
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>> VocLemmaGetAll()
|
||||
{
|
||||
Dictionary<string, Dictionary<string, string>> DTOResult = new Dictionary<string, Dictionary<string, string>>();
|
||||
@@ -1245,14 +1638,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
|
||||
@@ -1269,26 +1687,90 @@ 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 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
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration;
|
||||
private static IConfiguration _configuration = null!;
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -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,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static WebDoorCreator.Core.Enum;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// File 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 fileStatus status { get; set; } = fileStatus.none;
|
||||
public bool action { get; set; } = false;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -88,11 +88,16 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string UserIdLock { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Valore booleano per indicare se è in stato cancellazione logica
|
||||
/// </summary>
|
||||
public bool isLogicDel { get; set; } = false;
|
||||
|
||||
[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 +107,7 @@ namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
MeasureUnit = MeasureUnit,
|
||||
OrderId = OrderId,
|
||||
TypeId = TypeId,
|
||||
ParentId = ParentId,
|
||||
DoorExtCode = DoorExtCode,
|
||||
DateIns = adesso,
|
||||
UserIdIns = userId,
|
||||
@@ -116,5 +121,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 (UnitCost != item.UnitCost)
|
||||
return false;
|
||||
|
||||
//if (MeasureUnit != item.MeasureUnit)
|
||||
// return false;
|
||||
|
||||
//if (UnitCost != item.UnitCost)
|
||||
// return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,11 +131,11 @@ namespace WebDoorCreator.Data.DbModels
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// COmparazione tra il dizionario currVal corrente e quello ricevuto
|
||||
/// Comparazione tra il dizionario currVal corrente e quello ricevuto
|
||||
/// </summary>
|
||||
/// <param name="newDict">Dizionario x comparazione</param>
|
||||
/// <returns></returns>
|
||||
public bool JsoncActValEquals(Dictionary<string, string> newDict)
|
||||
public bool JsonActValEquals(Dictionary<string, string> newDict)
|
||||
{
|
||||
string JsonNewVal = JsonConvert.SerializeObject(newDict);
|
||||
bool answ = JsoncActVal.Equals(JsonNewVal);
|
||||
@@ -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; } = "";
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
[Table("TestTable")]
|
||||
public class IdentityTableSeedTest
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int IdUni { get; set; } = 0;
|
||||
|
||||
[MaxLength(50)]
|
||||
public string Campo1 { get; set; } = "";
|
||||
|
||||
[MaxLength(500)]
|
||||
public string Campo2 { 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,26 @@ 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>
|
||||
/// Expected order delivery from DCA
|
||||
/// </summary>
|
||||
public DateTime DateProm { get; set; } = DateTime.Now.AddDays(60);
|
||||
|
||||
/// <summary>
|
||||
/// Date Order confirmed by customer from Order table
|
||||
/// </summary>
|
||||
public DateTime DateOrd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Eventuale sconto globale
|
||||
/// </summary>
|
||||
public double Discount { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Stato globale dell'ordine
|
||||
/// </summary>
|
||||
@@ -61,9 +81,10 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string OrderDescript { get; set; } = "";
|
||||
|
||||
|
||||
|
||||
|
||||
[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,25 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// TotCost represent the total cost of the order
|
||||
/// </summary>
|
||||
public decimal TotCost { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Expected order delivery from DCA
|
||||
/// </summary>
|
||||
public DateTime DateProm { get; set; } = DateTime.Now.AddDays(60);
|
||||
|
||||
/// <summary>
|
||||
/// Date Order confirmed by customer from Order table
|
||||
/// </summary>
|
||||
public DateTime DateOrd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Effective order delivery date
|
||||
/// </summary>
|
||||
public DateTime DateDelivery { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Eventuale sconto globale
|
||||
/// </summary>
|
||||
public double Discount { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,12 +90,15 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string VAT { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Current Door ID
|
||||
/// </summary>
|
||||
public int DoorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Door's Type
|
||||
/// Door's parent ID
|
||||
/// </summary>
|
||||
public int TypeId { get; set; } = 0;
|
||||
public int ParentId { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace WebDoorCreator.Data
|
||||
|
||||
public MessagePipe(IConnectionMultiplexer redisConn, string channelName, bool enableLog = false)
|
||||
{
|
||||
_channel = channelName;
|
||||
_channel = new RedisChannel(channelName, RedisChannel.PatternMode.Literal); ;
|
||||
redis = redisConn;
|
||||
redisDb = redis.GetDatabase();
|
||||
this.enableLog = enableLog;
|
||||
@@ -94,7 +94,7 @@ namespace WebDoorCreator.Data
|
||||
/// <summary>
|
||||
/// Canale associato al gestore pipeline messaggi
|
||||
/// </summary>
|
||||
private string _channel { get; set; } = "";
|
||||
private RedisChannel _channel { get; set; } = new RedisChannel("Default", RedisChannel.PatternMode.Literal);
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
@@ -108,7 +108,7 @@ namespace WebDoorCreator.Data
|
||||
{
|
||||
Log.Trace($"ch {channel} | {message}");
|
||||
// messaggio
|
||||
PubSubEventArgs mea = new PubSubEventArgs(message);
|
||||
PubSubEventArgs mea = new PubSubEventArgs($"{message}");
|
||||
// se qualcuno ascolta sollevo evento nuovo valore...
|
||||
if (EA_NewMessage != null)
|
||||
{
|
||||
|
||||
@@ -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" }
|
||||
});
|
||||
}
|
||||
|
||||
+3
-1
@@ -287,8 +287,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
@@ -25,11 +25,13 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
name: "TreeCode",
|
||||
table: "DoorOpType");
|
||||
|
||||
#if false
|
||||
migrationBuilder.AddColumn<HierarchyId>(
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType",
|
||||
type: "hierarchyid",
|
||||
nullable: true);
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType",
|
||||
type: "hierarchyid",
|
||||
nullable: true);
|
||||
#endif
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "GraphicParams",
|
||||
@@ -75,9 +77,11 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
migrationBuilder.DropTable(
|
||||
name: "Hardware");
|
||||
|
||||
#if false
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType");
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType");
|
||||
#endif
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ParentDoorOpId",
|
||||
|
||||
+3
-1
@@ -298,8 +298,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -298,8 +298,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
Generated
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -306,8 +306,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -301,8 +301,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -305,8 +305,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -312,8 +312,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -312,8 +312,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -312,8 +312,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -334,8 +334,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -334,8 +334,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+994
@@ -0,0 +1,994 @@
|
||||
// <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)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
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
+1000
File diff suppressed because it is too large
Load Diff
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
+988
@@ -0,0 +1,988 @@
|
||||
// <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)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
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);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
+988
@@ -0,0 +1,988 @@
|
||||
// <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)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
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,52 @@
|
||||
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)
|
||||
{
|
||||
#if false
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType");
|
||||
#endif
|
||||
|
||||
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");
|
||||
|
||||
#if false
|
||||
migrationBuilder.AddColumn<HierarchyId>(
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType",
|
||||
type: "hierarchyid",
|
||||
nullable: true);
|
||||
#endif
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
+1081
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user