Compare commits
587 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d527f97067 | |||
| 48d5586866 | |||
| cd6313e82f | |||
| 8c07e5ba01 | |||
| 99268f7d79 | |||
| 31b4bb344f | |||
| 7d04ddf25f | |||
| 7a0c6efbe1 | |||
| f07e4d4a76 | |||
| 59a01f3af6 | |||
| 406931a475 | |||
| 54f499f2d3 | |||
| 237f4472ee | |||
| 4ad5aca746 | |||
| 78cf9e354d | |||
| e03e581ae0 | |||
| 08677aabbe | |||
| dc3e48e7c6 | |||
| e7b0b15a57 | |||
| c6dfa7915b | |||
| 925715095a | |||
| c0991acd28 | |||
| 25af587aec | |||
| f09147d98b | |||
| 4b9358556e | |||
| aec80af8bd | |||
| 896e1e8fc6 | |||
| f2c7832ecb | |||
| c9a2e3f7f6 | |||
| 5b0101c30a | |||
| 24387b2432 | |||
| 058abcfa95 | |||
| 86e8011c2c | |||
| 48f1931f25 | |||
| 4f4e163b6e | |||
| 2fb1960f80 | |||
| 1b03858140 | |||
| eb36a7459e | |||
| 297a69cb68 | |||
| 062bd1e0a0 | |||
| dba1fcb6e9 | |||
| 9a79f0d179 | |||
| 501c472c6a | |||
| 5d72d21fb1 | |||
| 8c0aee6662 | |||
| 079eefa03e | |||
| 50d77248f9 | |||
| 75eaa34e07 | |||
| 1f0bcf7de2 | |||
| ae1d5c2758 | |||
| c1f4b88908 | |||
| 8af0fb00fc | |||
| e3b4c87e46 | |||
| b6ff4a90ce | |||
| 2c56252ac5 | |||
| 1d98249fed | |||
| 69200f1335 | |||
| 2b92533d47 | |||
| 061c528ea5 | |||
| f03eb81d7e | |||
| a2a7b66241 | |||
| 92295f29be | |||
| 9667c07689 | |||
| 3874950313 | |||
| 42d07b113c | |||
| 45aefc8a48 | |||
| e30b1f34c4 | |||
| 2c42844dee | |||
| ef16416821 | |||
| b9f5c3c92b | |||
| 6fb1743507 | |||
| 6484635d7f | |||
| 290af1b978 | |||
| 1a3ee2a946 | |||
| 9210e4c092 | |||
| fcdef662b2 | |||
| 798acb1392 | |||
| df9225b6ae | |||
| 24b56588ae | |||
| 19be2f8878 | |||
| 964dc647a3 | |||
| 8f3a1d2b90 | |||
| 2b15354156 | |||
| 89c8577080 | |||
| 349192f648 | |||
| a4021798ac | |||
| 7583f8df7d | |||
| 4c5ce09b9b | |||
| 439654a945 | |||
| 8eadd17ad6 | |||
| a126e4ec1d | |||
| 536f90e95d | |||
| 3fcb4fff25 | |||
| 7014819b14 | |||
| 84c00577a1 | |||
| b85b70847d | |||
| 360836d005 | |||
| fcf9291808 | |||
| 6886cc6810 | |||
| 9865de3c3d | |||
| 9680272843 | |||
| cf13c89346 | |||
| d3469fbca8 | |||
| d92df51ced | |||
| 54ccb074dd | |||
| 4e6d69cc89 | |||
| 0496d5b2e9 | |||
| 8a8d90f9ab | |||
| e0a9eb4966 | |||
| 388d776308 | |||
| b913f27265 | |||
| 921753f162 | |||
| d849c87ccd | |||
| e9d4be90cc | |||
| b174792613 | |||
| 492f502fb5 | |||
| d795f303a0 | |||
| 7dded7438c | |||
| bae4c8a03d | |||
| 68cc736725 | |||
| 25a67b0898 | |||
| 247f74a575 | |||
| 228d2af96c | |||
| 158f1f1493 | |||
| 036bb412e8 | |||
| 8aeab39353 | |||
| f194ad34ee | |||
| a77276559b | |||
| e7e05fd127 | |||
| 3574978aae | |||
| de0fac3be6 | |||
| 2b10d4f867 | |||
| 12a02e8baf | |||
| e9b222942d | |||
| d142e72e6c | |||
| 1f408ea5a5 | |||
| 5bf07d00f5 | |||
| 3ab1e3681b | |||
| 58a1954c28 | |||
| 73b73aa333 | |||
| 216c5a4c2f | |||
| 6fafc0fed1 | |||
| f524cf74a2 | |||
| 320382a5ed | |||
| cb87306a2f | |||
| e57f6a1326 | |||
| 39d56aa23b | |||
| e236f0989b | |||
| 7f3e958d64 | |||
| 52d5a6e832 | |||
| ab6227a198 | |||
| ddebec6963 | |||
| 5afbd33648 | |||
| fc82226dd0 | |||
| 916d92b498 | |||
| 429c91f364 | |||
| d0e107a57f | |||
| 3619526fd3 | |||
| f19b882ea2 | |||
| 36fe5c1bcc | |||
| 08025c395d | |||
| 38cbf40ad2 | |||
| 0ef65b3cff | |||
| f539948a2a | |||
| eddc97b829 | |||
| 177629448e | |||
| 6d8c91d423 | |||
| e0b4c6bd47 | |||
| 88b3873437 | |||
| 51976f1027 | |||
| 9b94bd924e | |||
| 2fc28e2d82 | |||
| 5effbd862e | |||
| ed9a6d2bef | |||
| 00a54581d8 | |||
| 25cec0bb30 | |||
| 993438cdd4 | |||
| bff5ac2ef3 | |||
| 5731209938 | |||
| 5e7f63dc49 | |||
| 4df12c70e3 | |||
| fa26de23fb | |||
| 6f42cb3b95 | |||
| f47b472e9f | |||
| 8d1ecb7b27 | |||
| 4fdc49e230 | |||
| 368ab32248 | |||
| 022c80d17e | |||
| bff1753a64 | |||
| fb6d7b762c | |||
| d0db8f0c72 | |||
| 183e5a7dd2 | |||
| 569ac10492 | |||
| d76bfabdd1 | |||
| a81a0b21fc | |||
| 01f308743e | |||
| 30af6c43b6 | |||
| d92bce92bb | |||
| 9f8d01ff02 | |||
| 2b6c330ba6 | |||
| ccf88f2741 | |||
| 5284300395 | |||
| b75a240cd5 | |||
| eee703d2e6 | |||
| dde217cf11 | |||
| c58d5cc8d3 | |||
| f7deaef0bf | |||
| b8defd6f90 | |||
| a5b0865e34 | |||
| 826e2c0e75 | |||
| 28ba05bd7c | |||
| 2c846c5a84 | |||
| ff7ca06f16 | |||
| ae1b8ccb16 | |||
| 24b38c5389 | |||
| 091be0fd00 | |||
| 7d08b91ab4 | |||
| a5867e996a | |||
| 0a47fa058b | |||
| b205b42839 | |||
| dd8e000b42 | |||
| 1e0c352dea | |||
| 003c464d01 | |||
| eaf786fb2d | |||
| 1c99d1fd9d | |||
| 56d9e74b48 | |||
| 661ec612a8 | |||
| a0768aeebc | |||
| bc96f156dc | |||
| f2e3dc66d2 | |||
| deaa451c63 | |||
| 36fe231ae1 | |||
| 0a6078f4c5 | |||
| 0b78a66114 | |||
| 057de6e3e2 | |||
| a0ddbbf498 | |||
| 9257d58fa6 | |||
| 8e2ea9e05e | |||
| 5c1c4fd79f | |||
| 9c15cbba62 | |||
| 40504644aa | |||
| 48911cbc61 | |||
| 8175f1dc34 | |||
| 11a7eecf11 | |||
| 9cb63fb8d5 | |||
| 06fd9a074f | |||
| e6d9954ea6 | |||
| af761f6fdb | |||
| d89bd9caf2 | |||
| 01266a71a3 | |||
| 83f0c76824 | |||
| 98ec5aea98 | |||
| 780cd689e0 | |||
| ae1b3d6e38 | |||
| f62f51331d | |||
| 29cf5691a6 | |||
| 297476f05f | |||
| e3c662e723 | |||
| bd85e255c3 | |||
| 5cc6367f03 | |||
| 2836a2e30f | |||
| 4b18be9f76 | |||
| 580ed74f8f | |||
| c8dc10b442 | |||
| 9ed0df29dd | |||
| d08181d0d1 | |||
| 51168cc145 | |||
| 5a1075db98 | |||
| c5ce822bd4 | |||
| 0af8516020 | |||
| c9847e8acd | |||
| 5e2280bd33 | |||
| b6bfd8b7cb | |||
| 103a1d5692 | |||
| 7f8de87683 | |||
| 90b43957ca | |||
| 4b27d51b6a | |||
| 9922330b9f | |||
| b183ea2301 | |||
| 6cea09e97d | |||
| 06fcd2ee9b | |||
| 747510ac30 | |||
| 4961026cb8 | |||
| c071f70011 | |||
| f06cfc203f | |||
| 86aaf5438c | |||
| 965a44e677 | |||
| cb8ca635ec | |||
| c9eafd8caf | |||
| 55f40bf640 | |||
| cdf5f57109 | |||
| 87246d16a9 | |||
| b54de6961f | |||
| 78f7768dad | |||
| f2d5147336 | |||
| 9693422b8f | |||
| 83bd8a1945 | |||
| 82e837a856 | |||
| 5d0255ef59 | |||
| f268862b82 | |||
| 43f69f83de | |||
| 2e61d79eed | |||
| a81adba017 | |||
| b46cde8dcf | |||
| b53e3e1a7d | |||
| 16c9ae5e8d | |||
| 36571c02e1 | |||
| 9523281212 | |||
| 577c2dd4ae | |||
| 6af8564ef3 | |||
| 8a97bfe6bf | |||
| 9d098ef794 | |||
| 4cd9f7e8f2 | |||
| c4529affab | |||
| e8ae99a5d8 | |||
| d466baa1d9 | |||
| ff865edaf7 | |||
| d828dad852 | |||
| db85526528 | |||
| 5e1398b580 | |||
| d6f0770990 | |||
| e6f8363821 | |||
| 9437522d93 | |||
| f25615fa6d | |||
| 4d780620e3 | |||
| ba684302e0 | |||
| f192f8a37e | |||
| 2ee644b637 | |||
| b3214245d6 | |||
| ca50422d44 | |||
| 4a734a12f8 | |||
| ab3b32a780 | |||
| 49dbe7a085 | |||
| f344af5756 | |||
| 1e5fda085d | |||
| d7a22a62a8 | |||
| ecc62f269f | |||
| b34a0062b6 | |||
| d37755f5d7 | |||
| bfab8d3ef6 | |||
| ab211bc75c | |||
| 9847374501 | |||
| 5a3c338238 | |||
| c8b049be4f | |||
| e3421fb657 | |||
| 365a3653b4 | |||
| fe2bc0cfa6 | |||
| e025a9939d | |||
| 04bc2fab4c | |||
| 503dde2df3 | |||
| c96f942187 | |||
| 6dcd1ef03c | |||
| 01e4ac887c | |||
| bfb34ec81a | |||
| 76a0824310 | |||
| 637a04509e | |||
| a721f7bd51 | |||
| 8ddcffa7b1 | |||
| c0afb1a9bb | |||
| 97a2b3fc65 | |||
| 46345e3393 | |||
| 530ded0ff1 | |||
| 1d39502225 | |||
| abf15345e4 | |||
| 7a7a8c0bf8 | |||
| c3d558e3f4 | |||
| f942bd3607 | |||
| 1b466e4f71 | |||
| da9fe9f0e5 | |||
| c971db0056 | |||
| a838138df2 | |||
| 9049241bd7 | |||
| e1d36ff1de | |||
| 16a4633aa6 | |||
| 0b181c92da | |||
| 33ffe764e2 | |||
| ca43087a1e | |||
| f4867366aa | |||
| ade4d736a0 | |||
| aebd673b08 | |||
| 5af1a06f3a | |||
| 309065c0ee | |||
| 09705bb31f | |||
| cf39bceb89 | |||
| d0aa1e6904 | |||
| 00e6b19eba | |||
| a566e94c88 | |||
| 64beb99dba | |||
| 2d3cfabdf1 | |||
| 8bde0ce0cd | |||
| 30dd6cbd51 | |||
| fcdb23d281 | |||
| 493215ee33 | |||
| 6d7214a274 | |||
| 56785369ab | |||
| 301b69026d | |||
| 7a0bc3a9f9 | |||
| 2c1919c290 | |||
| 5274068c09 | |||
| 281e24423b | |||
| 26acf3c185 | |||
| 8d0adc92ee | |||
| 0d919556ad | |||
| 7bb56a9f1c | |||
| 3a391b090c | |||
| 122fd0bf0e | |||
| ae174cb094 | |||
| 93f284790b | |||
| 5b8c294136 | |||
| 32c75cdd05 | |||
| ff8f86c9ca | |||
| 4b6218ff75 | |||
| b409e698b7 | |||
| 927a89d388 | |||
| 5e172e1022 | |||
| fcd1f16071 | |||
| ba91bd9edb | |||
| 9fbd8600ab | |||
| f6a91943b0 | |||
| 3f90dc6016 | |||
| a4b4b47231 | |||
| 21ef7c6e73 | |||
| f5a6ad0033 | |||
| c38445b1cd | |||
| e90c52a744 | |||
| c7fcfa748c | |||
| c3c81755b0 | |||
| 97d9395f4a | |||
| c787b575b4 | |||
| 0a91b1413f | |||
| 2a2b2b3f31 | |||
| aaba44f575 | |||
| 5d6de5e7fc | |||
| e857b8a714 | |||
| 96b9402bf4 | |||
| b5568d6d7e | |||
| 60f961d5dd | |||
| 9842dcd70d | |||
| 1a6b7093c0 | |||
| 7974b9c2a9 | |||
| a58513d719 | |||
| 4a9e129071 | |||
| 57bd776be3 | |||
| 828c2c57f6 | |||
| c881b12524 | |||
| 623d9d3e6d | |||
| b522bd4ec0 | |||
| 0eb8d93241 | |||
| 86ca7fa93c | |||
| 97038f5ff7 | |||
| 660f8fd356 | |||
| 2e9f816685 | |||
| 2b14b256c1 | |||
| f84dd6e9fe | |||
| 39d4d61f12 | |||
| af06c24d7a | |||
| a9dff7d43b | |||
| db8f2da831 | |||
| b2ebe8e674 | |||
| ab550f8468 | |||
| d062c60073 | |||
| 4e75085d1f | |||
| 71ca2d7e69 | |||
| 780eef4459 | |||
| 9163841613 | |||
| 543428608f | |||
| 5c7bfada7e | |||
| c5092e711b | |||
| 0c86362d41 | |||
| c864a7df5f | |||
| f306683687 | |||
| a8743bec74 | |||
| db5638e776 | |||
| 9ddf247346 | |||
| 32397cead9 | |||
| 6ccbffdecf | |||
| a714b5388b | |||
| 2633d7af0a | |||
| ea148e953c | |||
| ea5f4b2284 | |||
| 55cfed26bb | |||
| c4f646a8b0 | |||
| 2e852b0893 | |||
| 94f22f8fa4 | |||
| 0f75ef1633 | |||
| 05b6a42db1 | |||
| 872b5ca316 | |||
| c7f4c97700 | |||
| d7d1698a10 | |||
| 34d23a6b80 | |||
| 09f4c3c5f9 | |||
| 5ace18880b | |||
| 78fb307cbb | |||
| cb185b8786 | |||
| 3462046e42 | |||
| 4821f441b6 | |||
| 816a7278aa | |||
| b502420309 | |||
| ab1556058a | |||
| 00ec07453b | |||
| c924e5b4e7 | |||
| 6ba7564862 | |||
| ecaabd56ec | |||
| bf8f455c0c | |||
| f5884e371d | |||
| 4b6c6c7360 | |||
| b5866beb43 | |||
| 72063ec338 | |||
| 704169ea7a | |||
| 8fd4d39bb5 | |||
| 4dbe99f2f1 | |||
| c7320338d7 | |||
| ff05e237a6 | |||
| c3ec21979c | |||
| a7d27169f1 | |||
| a1f3703c1b | |||
| 46937deb89 | |||
| 065d6bd7e9 | |||
| 2df65a3f81 | |||
| 42a9bb0939 | |||
| 02d47189c7 | |||
| 82f29a64c9 | |||
| 2c0ef38c8f | |||
| 0946620767 | |||
| 4e0c53a875 | |||
| 2409d677b3 | |||
| 57f7a58298 | |||
| a5d70ede6a | |||
| 42fc9a9db1 | |||
| 7a2c227296 | |||
| daa6a793d8 | |||
| 0e9d9aade2 | |||
| d59f2489d0 | |||
| e2bd1bc4ca | |||
| 26c3321461 | |||
| acd0b7fed1 | |||
| d8ca11601d | |||
| baf3c89c10 | |||
| 3ac94e4a14 | |||
| 0bdc4ef879 | |||
| 53f6712d86 | |||
| 431690be9d | |||
| f23d19cf64 | |||
| 3584075fcf | |||
| bc59b06b6e | |||
| c70e6151d9 | |||
| b8ec296dc6 | |||
| 8bfa06ec0a | |||
| 39388f44c7 | |||
| 9fd6736f27 | |||
| ad9e9fc957 | |||
| 46dd6e0cc3 | |||
| bd8617750f | |||
| f4fa99c0c2 | |||
| 3c271dd802 | |||
| d285162d63 | |||
| 9604e12b21 | |||
| 4298d1d8be | |||
| 61340fe6dc | |||
| 5f0a82ab67 | |||
| ce071c8cfd | |||
| b5d72a18bb | |||
| 1c7aef0bad | |||
| 0b6851eefb | |||
| 74db3e9c0c | |||
| a0503bb07e | |||
| 78da4b0922 | |||
| 74b640efe3 | |||
| c2da7c5590 | |||
| 951cc064c7 | |||
| c2f469cd29 | |||
| c0638513cb | |||
| 094750f247 | |||
| 28f2dbf2e3 | |||
| 7841e5ebbc | |||
| da56ffcca8 | |||
| a5ec8f2105 | |||
| 5a8b618a68 | |||
| fcdb96834e | |||
| 6b868ee1a0 | |||
| c35afc82c6 | |||
| 45c5de32a8 | |||
| 5d49772dba | |||
| 017f3ea2b1 | |||
| 5eb53c677d | |||
| 20fc4f1793 | |||
| 1239951b72 |
@@ -0,0 +1,4 @@
|
||||
[*.cs]
|
||||
|
||||
# CS1591: Missing XML comment for publicly visible type or member
|
||||
dotnet_diagnostic.CS1591.severity = none
|
||||
+154
-152
@@ -1,17 +1,32 @@
|
||||
variables:
|
||||
NEXUS_PATH: 'LiMan'
|
||||
APP_NAME: 'LiMan.UI'
|
||||
VERS_MAIN: '2.1'
|
||||
NEXUS_PATH: 'LiMan'
|
||||
APP_NAME: 'LiMan.UI'
|
||||
SOL_NAME: 'LiMan.UI'
|
||||
NUGET_PATH: 'C:\Tools\nuget.exe'
|
||||
MSBUILD_PATH: 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe'
|
||||
SRC_ZIP_PATH: 'bin\publish\net6.0'
|
||||
|
||||
# helper x fix pacchetti nuget da repo locale nexus.steamware.net
|
||||
.nuget-fix: &nuget-fix
|
||||
- |
|
||||
$hasSource = C:\Tools\nuget.exe sources list | find "`"Steamware Nexus`"" /C
|
||||
if ($hasSource -eq 0) {
|
||||
C:\Tools\nuget.exe sources Add -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
|
||||
} else {
|
||||
C:\Tools\nuget.exe sources Update -Name "`"Steamware Nexus`"" -Source https://nexus.steamware.net/repository/nuget-group -username "`"nugetUser`"" -password "`"viaDante16`""
|
||||
echo "esecuzione Nuget FIX steps"
|
||||
dotnet nuget list source
|
||||
$hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus Proxy"
|
||||
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
||||
dotnet nuget remove source "Steamware Nexus Proxy"
|
||||
}
|
||||
echo $hasSource
|
||||
$hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus"
|
||||
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
||||
dotnet nuget remove source "Steamware Nexus"
|
||||
}
|
||||
$hasSource = dotnet nuget list source | Select-String -Pattern "nexus-proxy-v3"
|
||||
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
||||
dotnet nuget remove source nexus-proxy-v3
|
||||
}
|
||||
dotnet nuget add source https://nexus.steamware.net/repository/nuget-group-3/index.json -n "Steamware Nexus" -u nugetUser -p $NEXUS_PASSWD --store-password-in-clear-text
|
||||
echo "Steamware Nexus Source added, final state:"
|
||||
dotnet nuget list source
|
||||
|
||||
# helper creazione files zip
|
||||
.zipper: &zipper
|
||||
@@ -22,25 +37,12 @@ variables:
|
||||
}
|
||||
Set-Alias 7zip $7zipPath
|
||||
$Target = "$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip"
|
||||
$Source = "$env:APP_NAME\bin\publish\net6.0\*"
|
||||
$Source = "$env:APP_NAME\$SRC_ZIP_PATH\*"
|
||||
echo "calling 7zip $Source --> $Target"
|
||||
7zip a -tzip $Target $Source -xr!DATA
|
||||
echo "called ZIP $Source --> $Target"
|
||||
|
||||
#cd "$env:APP_NAME\bin\publish\net6.0"
|
||||
|
||||
# # helper creazione hash files x EXE
|
||||
# .hashBuildExe: &hashBuildExe
|
||||
# - |
|
||||
# $Target = "$env:APP_NAME\Releases\" + $CI_COMMIT_BRANCH + "\" + $env:APP_NAME + ".zip"
|
||||
# $MD5 = Get-FileHash $Target -Algorithm MD5
|
||||
# $SHA1 = Get-FileHash $Target -Algorithm SHA1
|
||||
# New-Item $Target".md5"
|
||||
# New-Item $Target".sha1"
|
||||
# $MD5.Hash | Set-Content -Path $Target".md5"
|
||||
# $SHA1.Hash | Set-Content -Path $Target".sha1"
|
||||
|
||||
# echo "Created HASH files for $Target"
|
||||
|
||||
# helper creazione hash files x IIS
|
||||
.hashBuild: &hashBuild
|
||||
- |
|
||||
@@ -78,201 +80,201 @@ variables:
|
||||
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/ARCHIVE/$VersNumb/$FileName
|
||||
echo "mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/$FileName"
|
||||
}
|
||||
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\manifest.xml" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/manifest.xml
|
||||
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\ChangeLog.html" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/ChangeLog.html
|
||||
|
||||
|
||||
# mCurl -v -u $env:NEXUS_USER:$env:NEXUS_PASSWD --upload-file bin/release/$env:APP_NAME.zip $env:NEXUS_SERVER/utility/$env:NEXUS_PATH/$version/$env:APP_NAME-$version.zip
|
||||
|
||||
# image: mcr.microsoft.com/dotnet/sdk:6.0
|
||||
|
||||
# helper x fix version number
|
||||
.version-fix: &version-fix
|
||||
- |
|
||||
$env:NEW_REL = $env:VERS_MAIN+"."+(get-date -format yyMM)+"."+(get-date -format ddHH)
|
||||
$env:NUM_REL = $env:VERS_MAIN+"."+(get-date -format yyMM)+"."+(get-date -format dHH)
|
||||
$env:NUM_DEB = $env:VERS_MAIN+"."+(get-date -format yyMM)+"-beta."+(get-date -format dHH)
|
||||
$env:NEW_COPYRIGHT = "EgalWare @ 2021-" + (get-date -format yyyy)
|
||||
#$contenuto = Get-Content -path 'VersGen\VersGen.cs' -Raw
|
||||
#$newContenuto = $contenuto -replace '0.0.0.0', $env:NEW_REL
|
||||
#$newContenuto = $newContenuto -replace 'EgalWare © 2021', $env:NEW_COPYRIGHT
|
||||
#$newContenuto | Set-Content -Path 'VersGen\VersGen.cs'
|
||||
# display versioni generate
|
||||
$resoconto = "Effettuato fix file VersGen | release v: " + $env:NUM_REL + " | debug v: " + $env:NUM_DEB;
|
||||
Write-Output $resoconto;
|
||||
echo "Replace completati"
|
||||
|
||||
# helper x fix nuspec file
|
||||
.nuspec-fix: &nuspec-fix
|
||||
- |
|
||||
echo "Modifica dati file nuspec Release"
|
||||
$currRelease = $env:NUM_REL
|
||||
$currDebug = $env:NUM_DEB
|
||||
$find = "<version>(.|\n)*?</version>";
|
||||
$fileNameRel = "$env:APP_NAME.Release.nuspec";
|
||||
$replRel = "<version>" + $currRelease + "</version>";
|
||||
$nuspDataRel = Get-Content $fileNameRel;
|
||||
$nuspDataRelUpd = $nuspDataRel -replace $find, $replRel;
|
||||
$nuspDataRelUpd = $nuspDataRelUpd -replace "#copyright#", $replCopy;
|
||||
$nuspDataRelUpd = $nuspDataRelUpd -replace "#releaseNotes#", "Build $adesso";
|
||||
Set-Content -Path $fileNameRel -Value $nuspDataRelUpd;
|
||||
echo "Modifica dati file nuspec Debug"
|
||||
$fileNameDeb = "$env:APP_NAME.Debug.nuspec";
|
||||
$replDeb = "<version>" + $currDebug + "</version>";
|
||||
$nuspDataDeb = Get-Content $fileNameDeb;
|
||||
$nuspDataDebUpd = $nuspDataDeb -replace $find, $replDeb;
|
||||
$nuspDataDebUpd = $nuspDataDebUpd -replace "#copyright#", $replCopy;
|
||||
$nuspDataDebUpd = $nuspDataDebUpd -replace "#releaseNotes#", "Build $adesso";
|
||||
Set-Content -Path $fileNameDeb -Value $nuspDataDebUpd;
|
||||
echo "replace completati"
|
||||
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
- release
|
||||
|
||||
# --------------------------------
|
||||
# BUILD
|
||||
# --------------------------------
|
||||
UI:build:
|
||||
stage: build
|
||||
tags:
|
||||
- win
|
||||
except:
|
||||
- EgwAppControlCenter
|
||||
variables:
|
||||
SOL_NAME: LiMan
|
||||
APP_NAME: LiMan.UI
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore LiMan.sln
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
script:
|
||||
- dotnet build LiMan.UI/LiMan.UI.csproj
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
API:build:
|
||||
stage: build
|
||||
tags:
|
||||
- win
|
||||
except:
|
||||
- EgwAppControlCenter
|
||||
variables:
|
||||
SOL_NAME: LiMan
|
||||
APP_NAME: LiMan.Api
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore LiMan.sln
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
script:
|
||||
- dotnet build LiMan.Api/LiMan.Api.csproj
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
Transfer:build:
|
||||
stage: build
|
||||
tags:
|
||||
- win
|
||||
except:
|
||||
- EgwAppControlCenter
|
||||
variables:
|
||||
SOL_NAME: LiMan
|
||||
APP_NAME: LiMan.Transfer
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore LiMan.sln
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
script:
|
||||
- dotnet build LiMan.Transfer/LiMan.Transfer.csproj
|
||||
|
||||
UI:test:
|
||||
stage: test
|
||||
tags:
|
||||
- win
|
||||
only:
|
||||
- develop
|
||||
needs: ["UI:build"]
|
||||
script:
|
||||
- dotnet test LiMan.UI/LiMan.UI.csproj
|
||||
|
||||
API:test:
|
||||
stage: test
|
||||
tags:
|
||||
- win
|
||||
only:
|
||||
- develop
|
||||
needs: ["API:build"]
|
||||
script:
|
||||
- dotnet test LiMan.Api/LiMan.Api.csproj
|
||||
|
||||
Transfer:test:
|
||||
stage: test
|
||||
tags:
|
||||
- win
|
||||
needs: ["Transfer:build"]
|
||||
script:
|
||||
- dotnet test LiMan.Transfer/LiMan.Transfer.csproj
|
||||
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
# --------------------------------
|
||||
# DEPLOY
|
||||
# --------------------------------
|
||||
UI:IIS01:deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
SOL_NAME: LiMan
|
||||
APP_NAME: LiMan.UI
|
||||
SRC_ZIP_PATH: bin\Release\net6.0
|
||||
only:
|
||||
- develop
|
||||
needs: ["UI:test"]
|
||||
needs: ["UI:build"]
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
script:
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true LiMan.UI/LiMan.UI.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- *zipper
|
||||
- *hashBuild
|
||||
- *nexusUpload
|
||||
|
||||
API:IIS01:deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
SOL_NAME: LiMan
|
||||
APP_NAME: LiMan.Api
|
||||
SRC_ZIP_PATH: bin\Release\net6.0
|
||||
only:
|
||||
- develop
|
||||
needs: ["API:test"]
|
||||
needs: ["API:build"]
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
script:
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true LiMan.Api/LiMan.Api.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- *zipper
|
||||
- *hashBuild
|
||||
- *nexusUpload
|
||||
|
||||
UI:IIS02:deploy:
|
||||
UI:IIS04:deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
SOL_NAME: LiMan
|
||||
APP_NAME: LiMan.UI
|
||||
SRC_ZIP_PATH: bin\Release\net6.0
|
||||
only:
|
||||
- main
|
||||
needs: ["UI:build"]
|
||||
script:
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true LiMan.UI/LiMan.UI.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true LiMan.UI/LiMan.UI.csproj
|
||||
|
||||
API:IIS02:deploy:
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
script:
|
||||
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- *zipper
|
||||
- *hashBuild
|
||||
- *nexusUpload
|
||||
|
||||
API:IIS04:deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
- win
|
||||
except:
|
||||
- EgwAppControlCenter
|
||||
variables:
|
||||
SOL_NAME: LiMan
|
||||
APP_NAME: LiMan.Api
|
||||
SRC_ZIP_PATH: bin\Release\net6.0
|
||||
only:
|
||||
- main
|
||||
needs: ["API:build"]
|
||||
script:
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true LiMan.Api/LiMan.Api.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true LiMan.Api/LiMan.Api.csproj
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
script:
|
||||
- dotnet publish -p:PublishProfile=IIS04.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- *zipper
|
||||
- *hashBuild
|
||||
- *nexusUpload
|
||||
|
||||
Transfer:deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
- win
|
||||
except:
|
||||
- EgwAppControlCenter
|
||||
variables:
|
||||
SOL_NAME: LiMan
|
||||
APP_NAME: LiMan.Transfer
|
||||
needs: ["Transfer:test"]
|
||||
needs: ["Transfer:build"]
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
script:
|
||||
- dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release LiMan.Transfer/LiMan.Transfer.csproj
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=SingleFileX86.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- *zipper
|
||||
- *hashBuild
|
||||
- *nexusUpload
|
||||
|
||||
|
||||
# UI:installer:
|
||||
# stage: installer
|
||||
# tags:
|
||||
# - win
|
||||
# only:
|
||||
# - develop
|
||||
# - main
|
||||
# needs: ["UI:build"]
|
||||
# variables:
|
||||
# APP_NAME: LiMan.UI
|
||||
# NEXUS_PATH: MP-LAND
|
||||
# before_script:
|
||||
# # - *nuget-fix
|
||||
# # - dotnet restore
|
||||
# script:
|
||||
# - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release LiMan.UI/LiMan.UI.csproj -o:publish
|
||||
# # qui il deploy su nexus...
|
||||
# - *hashBuild
|
||||
# - *nexusUpload
|
||||
|
||||
# API:installer:
|
||||
# stage: installer
|
||||
# tags:
|
||||
# - win
|
||||
# only:
|
||||
# - develop
|
||||
# - main
|
||||
# needs: ["API:build"]
|
||||
# variables:
|
||||
# APP_NAME: LiMan.Api
|
||||
# NEXUS_PATH: MP-PROG
|
||||
# before_script:
|
||||
# # - *nuget-fix
|
||||
# # - dotnet restore
|
||||
# script:
|
||||
# - dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release LiMan.Api/LiMan.Api.csproj -o:publish
|
||||
# # qui il deploy su nexus...
|
||||
# - *hashBuild
|
||||
# - *nexusUpload
|
||||
|
||||
# UI:release:
|
||||
# stage: release
|
||||
# tags:
|
||||
# - win
|
||||
# only:
|
||||
# #- feature/Deploy_CI_CD
|
||||
# # - main
|
||||
# - tags
|
||||
# except:
|
||||
# - branches
|
||||
# needs: ["UI:build"]
|
||||
# artifacts:
|
||||
# paths:
|
||||
# - publish/
|
||||
# script:
|
||||
# - dotnet publish -c Release -o ./publish LiMan.UI/LiMan.UI.csproj
|
||||
|
||||
# API:release:
|
||||
# stage: release
|
||||
# tags:
|
||||
# - win
|
||||
# only:
|
||||
# #- feature/Deploy_CI_CD
|
||||
# # - main
|
||||
# - tags
|
||||
# except:
|
||||
# - branches
|
||||
# needs: ["API:build"]
|
||||
# artifacts:
|
||||
# paths:
|
||||
# - publish/
|
||||
# script:
|
||||
# - dotnet publish -c Release -o ./publish LiMan.Api/LiMan.Api.csproj
|
||||
|
||||
Vendored
+1
-1
@@ -10,7 +10,7 @@
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
// If you have changed target frameworks, make sure to update the program path.
|
||||
"program": "${workspaceFolder}/LiMan.UI/bin/Debug/net5.0/LiMan.UI.dll",
|
||||
"program": "${workspaceFolder}/LiMan.UI/bin/Debug/net6.0/LiMan.UI.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/LiMan.UI",
|
||||
"stopAtEntry": false,
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Core.Enum;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
public class AppRelVersion
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Installazione funzionalità uploader
|
||||
/// </summary>
|
||||
public string CodInst { get; set; } = "";
|
||||
/// <summary>
|
||||
/// ID upload app
|
||||
/// </summary>
|
||||
public string UplAppID { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Chiave di autorizzazione alla comunicazione
|
||||
/// </summary>
|
||||
public string MasterKey { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Cod applicativo di riferimento
|
||||
/// </summary>
|
||||
public string CodApp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Tipo Applicazione
|
||||
/// </summary>
|
||||
public string Tipo { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Versione applicativo formato semver numerico 4 blocchi
|
||||
/// </summary>
|
||||
public string VersNum { get; set; } = "0.0.0.0";
|
||||
|
||||
/// <summary>
|
||||
/// Versione applicativo, formato testuale libero, può essere uguale a VersNum
|
||||
/// </summary>
|
||||
public string VersText { get; set; } = "a.b";
|
||||
|
||||
/// <summary>
|
||||
/// Data di release
|
||||
/// </summary>
|
||||
public DateTime ReleaseDate { get; set; } = DateTime.Today.AddYears(100);
|
||||
|
||||
/// <summary>
|
||||
/// Tag associati a versione, comma separated
|
||||
/// </summary>
|
||||
public string RelTags { get; set; } = "";
|
||||
|
||||
public bool IsValid
|
||||
{
|
||||
get => !string.IsNullOrEmpty(CodInst) && !string.IsNullOrEmpty(UplAppID) && !string.IsNullOrEmpty(MasterKey) && !string.IsNullOrEmpty(CodApp) && !string.IsNullOrEmpty(VersNum) && !string.IsNullOrEmpty(VersText);
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
public class Const
|
||||
{
|
||||
|
||||
// classi utilità x cache REDIS dati DB
|
||||
public const string redisBaseAddr = "LiMan:Ui";
|
||||
public const string rKeyConfig = $"{redisBaseAddr}:Cache";
|
||||
public const string ENRL_MSG_PIPE = $"{redisBaseAddr}:MPipe:Enroll";
|
||||
public const string TASK_MSG_PIPE = $"{redisBaseAddr}:MPipe:Tasks";
|
||||
public const string UPDT_MSG_PIPE = $"{redisBaseAddr}:MPipe:Update";
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Core.DTO
|
||||
{
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
public class AuthDataDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Master Key
|
||||
/// </summary>
|
||||
public string MastKey { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice Impiego istanza SubLic
|
||||
/// </summary>
|
||||
public string CodImp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Chiave SubLic
|
||||
/// </summary>
|
||||
public string AppKey { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Verifica complessiva validità richiesta:
|
||||
/// CodApp presente
|
||||
/// - MainKey oppure CodImp + AppKey presenti
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public virtual bool IsValid
|
||||
{
|
||||
get => (!string.IsNullOrEmpty(MastKey) || (!string.IsNullOrEmpty(CodImp) && !string.IsNullOrEmpty(AppKey)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Core.DTO
|
||||
{
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
public class ManDeclareDTO : AuthDataDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Elenco delle CodApp Gestite
|
||||
/// </summary>
|
||||
public List<string> ListCodApp { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Verifica complessiva validità richiesta:
|
||||
/// CodApp presente
|
||||
/// - MainKey oppure CodImp + AppKey presenti
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public override bool IsValid
|
||||
{
|
||||
get => (ListCodApp != null && ListCodApp.Count > 0) && (!string.IsNullOrEmpty(MastKey) || (!string.IsNullOrEmpty(CodImp) && !string.IsNullOrEmpty(AppKey)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Core.DTO
|
||||
{
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
public class ReleaseReqDTO : AuthDataDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// CodApp Richiesta
|
||||
/// </summary>
|
||||
public string CodApp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Versione minima richiesta
|
||||
/// </summary>
|
||||
public string VersMin { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Versione MAX richiesta
|
||||
/// </summary>
|
||||
public string VersMax { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Numero di Impieghi attivi (es num di IOB relativi)
|
||||
/// </summary>
|
||||
public int NumImp { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Verifica complessiva validità richiesta:
|
||||
/// CodApp presente
|
||||
/// - MainKey oppure CodImp + AppKey presenti
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public override bool IsValid
|
||||
{
|
||||
get => !string.IsNullOrEmpty(CodApp) && (!string.IsNullOrEmpty(MastKey) || (!string.IsNullOrEmpty(CodImp) && !string.IsNullOrEmpty(AppKey)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Core.DTO
|
||||
{
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
public class TaskResultDTO : AuthDataDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Payload informazione ricevuto come dizionario chiavi/valore, il valore potrebbe essere un info ulteriormente serializzata
|
||||
/// </summary>
|
||||
public Dictionary<string,string> DataPayload { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,18 @@
|
||||
using System;
|
||||
using static Core.Enum;
|
||||
|
||||
namespace Core.DTO
|
||||
{
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
public class TicketDTO
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public string CodApp { get; set; } = "";
|
||||
public string CodInst { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice univoco della sub licenza (opzionale)
|
||||
/// </summary>
|
||||
@@ -33,6 +40,11 @@ namespace Core.DTO
|
||||
/// </summary>
|
||||
public int IdxLic { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Tipologia di ticket
|
||||
/// </summary>
|
||||
public TipologiaTicket TType { get; set; } = TipologiaTicket.Licenze;
|
||||
|
||||
/// <summary>
|
||||
/// IDX licenza child (opzionale)
|
||||
/// </summary>
|
||||
|
||||
+150
-32
@@ -1,53 +1,171 @@
|
||||
namespace Core
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Stato richieste x workflow interno
|
||||
/// </summary>
|
||||
public enum StatoRichiesta
|
||||
public class Enum
|
||||
{
|
||||
ND = 0,
|
||||
/// <summary>
|
||||
/// Stato richieste x workflow interno
|
||||
/// </summary>
|
||||
public enum StatoRichiesta
|
||||
{
|
||||
ND = 0,
|
||||
|
||||
Richiesta,
|
||||
Richiesta,
|
||||
|
||||
Valutazione,
|
||||
Valutazione,
|
||||
|
||||
Approvata,
|
||||
Approvata,
|
||||
|
||||
Rifiutata
|
||||
}
|
||||
Rifiutata
|
||||
}
|
||||
|
||||
public enum TipoLicenza
|
||||
{
|
||||
ND = 0,
|
||||
public enum TipoLicenza
|
||||
{
|
||||
ND = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Licenza LEgacy Steamware
|
||||
/// </summary>
|
||||
GLS,
|
||||
|
||||
/// <summary>
|
||||
/// Master Key License, che ha una data di scadenza globale ed un token = numero di utenti/token massimi associati
|
||||
/// </summary>
|
||||
MasterKey,
|
||||
|
||||
/// <summary>
|
||||
/// UserKey License (licenza che consuma un token utente della licenza master) - es GPW
|
||||
/// </summary>
|
||||
UserKey,
|
||||
|
||||
/// <summary>
|
||||
/// Chiave tipo Checksum basata su licenza master + checksum MD5 di una serie di dati (child licenses)
|
||||
/// </summary>
|
||||
CheckSumKey,
|
||||
|
||||
/// <summary>
|
||||
/// Chiave tiupo SubLicenza applicativa (es AppControlCenter)
|
||||
/// </summary>
|
||||
AppSubLic
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Licenza LEgacy Steamware
|
||||
/// Tipologia di ticket
|
||||
/// </summary>
|
||||
GLS,
|
||||
public enum TipologiaTicket
|
||||
{
|
||||
ND = 0,
|
||||
Licenze,
|
||||
FileUpload
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Master Key License, che ha una data di scadenza globale ed un token = numero di utenti/token massimi associati
|
||||
/// Elenco tipi app ammessi
|
||||
/// </summary>
|
||||
MasterKey,
|
||||
public static Dictionary<string, string> AppType = new Dictionary<string, string>{
|
||||
{ "", "---Selezionare---" },
|
||||
{ "Cli", "Cli (Console)" },
|
||||
{ "EgwACC", "EgwAppCtrCenter" },
|
||||
{ "LicenceApp", "LicenceApp" },
|
||||
{ "Machine", "Machine" },
|
||||
{ "WebApp", "WebApp" },
|
||||
{ "WinApp", "WinApp" }
|
||||
};
|
||||
|
||||
#if false
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum AppType
|
||||
{
|
||||
None,
|
||||
Cli,
|
||||
Machine,
|
||||
WebApp,
|
||||
WinApp,
|
||||
LicenceApp
|
||||
}
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// UserKey License (licenza che consuma un token utente della licenza master) - es GPW
|
||||
/// Elenco tipi di azioni che si possono chiedere ad EgwACC
|
||||
/// </summary>
|
||||
UserKey,
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum EgwAccTask
|
||||
{
|
||||
/// <summary>
|
||||
/// Non definito (init)
|
||||
/// </summary>
|
||||
ND = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta ricerca generica app da sorgenti mappate (registro, path...) ricevute in input
|
||||
/// </summary>
|
||||
AppSearch,
|
||||
|
||||
/// <summary>
|
||||
/// Effettua backup ed invio cartella CONF delle app gestite x update
|
||||
/// </summary>
|
||||
BackupSendConf,
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta info device (analoghe a quelle del setup iniziale in Enroll)
|
||||
/// </summary>
|
||||
DeviceInfoGet,
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta verifica forzata da remoto
|
||||
/// </summary>
|
||||
ForceCheck,
|
||||
|
||||
/// <summary>
|
||||
/// Richiede reload forzato (come da tray menu con Reload senza check update)
|
||||
/// </summary>
|
||||
ForceReload,
|
||||
|
||||
/// <summary>
|
||||
/// Richiede update forzato (come da tray menu con restart tramite bootstrap process esterno)
|
||||
/// </summary>
|
||||
ForceUpdate,
|
||||
|
||||
/// <summary>
|
||||
/// Info tipo License (Oxysec key)
|
||||
/// </summary>
|
||||
OxyLicenseGet,
|
||||
|
||||
/// <summary>
|
||||
/// Forza Reset parametri opzionali impostabili da remoto
|
||||
/// </summary>
|
||||
ParamDictReset,
|
||||
|
||||
/// <summary>
|
||||
/// Upsert di parametri operativi (gestiti in remoto)
|
||||
/// </summary>
|
||||
ParamUpsert,
|
||||
|
||||
/// <summary>
|
||||
/// Upsert valori TargetList (gestiti in remoto)
|
||||
/// </summary>
|
||||
TargetListUpsert,
|
||||
|
||||
/// <summary>
|
||||
/// Aggiorno di un applicazione richiamato da remoto
|
||||
/// </summary>
|
||||
TargetAppUpdate
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chiave tiupo Checksum basata su licenza masster + checksum MD5 di una serie di dati (child licenses)
|
||||
/// /Status di aggiornamento di un applicativo updater
|
||||
/// </summary>
|
||||
CheckSumKey
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tipologia di ticket
|
||||
/// </summary>
|
||||
public enum TipologiaTicket
|
||||
{
|
||||
ND = 0,
|
||||
Licenze,
|
||||
FileUpload
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum UpdStatus
|
||||
{
|
||||
None,
|
||||
Pending,
|
||||
Running,
|
||||
Done
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,153 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Init classe validatore
|
||||
/// </summary>
|
||||
public class MachineDataValidator
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Init classe validatore
|
||||
/// </summary>
|
||||
/// <param name="currMachineData"></param>
|
||||
public MachineDataValidator(string rawData)
|
||||
{
|
||||
// inizializzo info di base
|
||||
Dictionary<string, string> currMachineData = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(rawData))
|
||||
{
|
||||
try
|
||||
{
|
||||
currMachineData = JsonConvert.DeserializeObject<Dictionary<string, string>>(rawData);
|
||||
}
|
||||
catch(Exception exc)
|
||||
{ }
|
||||
}
|
||||
machTestData = currMachineData;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce HASH del codice impiego = payload utente
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string machineKeyHash
|
||||
{
|
||||
get => calcMachineHash();
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Private Fields
|
||||
|
||||
/// <summary>
|
||||
/// Dati rispetto cui fare i calcoli di validazione
|
||||
/// </summary>
|
||||
private Dictionary<string, string> machTestData = new Dictionary<string, string>();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Calcola HASH del codice impiego = payload utente
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string calcMachineHash()
|
||||
{
|
||||
string hash = "";
|
||||
string buffData = currBaseBuffer();
|
||||
if (!string.IsNullOrEmpty(buffData))
|
||||
{
|
||||
// hashing!
|
||||
|
||||
using (var hAlgo = SHA512.Create())
|
||||
//using (var hAlgo = MD5.Create())
|
||||
{
|
||||
byte[] InputBytes = Encoding.UTF8.GetBytes(buffData);
|
||||
var byteHash = hAlgo.ComputeHash(InputBytes);
|
||||
hash = BitConverter.ToString(byteHash).Replace("-", "").Replace("/", "").Replace("\\", "").ToLowerInvariant();
|
||||
}
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
public bool hasValidData
|
||||
{
|
||||
get => machTestData != null && machTestData.Count > 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcola hash key da info PC
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string currBaseBuffer()
|
||||
{
|
||||
string answ = "????????????????????????????????????????????";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
try
|
||||
{
|
||||
// calcolo hashKey da alcuni valori solamente
|
||||
sb.Append($"{machTestData["SystemName"]}|");
|
||||
sb.Append($"{machTestData["ProcessorId"]}|");
|
||||
sb.Append($"{machTestData["PartNumber"]}|");
|
||||
sb.Append($"{machTestData["MACAddress"]}|");
|
||||
sb.Append($"{machTestData["SerialNumber"]}|");
|
||||
sb.Append($"{machTestData["OSArchitecture"]}|");
|
||||
sb.Append($"{machTestData["SoftwareElementID"]}|");
|
||||
sb.Append($"{machTestData["SystemBiosMajorVersion"]}|");
|
||||
sb.Append($"{machTestData["SystemBiosMinorVersion"]}|");
|
||||
sb.Append($"{machTestData["CpuVersion"]}|");
|
||||
sb.Append($"{machTestData["BiosVersion"]}|");
|
||||
if (sb.Length > 0)
|
||||
{
|
||||
answ = sb.ToString();
|
||||
// lo uso 2 volte dritto e reverse...
|
||||
answ += ReverseString(sb.ToString());
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera info da dictionary
|
||||
/// </summary>
|
||||
/// <param name="keyName"></param>
|
||||
/// <returns></returns>
|
||||
private string getDictVal(string keyName)
|
||||
{
|
||||
string answ = $"{keyName}{keyName}";
|
||||
if (machTestData.ContainsKey(keyName))
|
||||
{
|
||||
answ = machTestData[keyName];
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Esegue reverse delal stringa
|
||||
/// </summary>
|
||||
/// <param name="myStr"></param>
|
||||
/// <returns></returns>
|
||||
private string ReverseString(string myStr)
|
||||
{
|
||||
char[] myArr = myStr.ToCharArray();
|
||||
Array.Reverse(myArr);
|
||||
return new string(myArr);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
public class MeasureUtils
|
||||
{
|
||||
#region Public Fields
|
||||
|
||||
public static readonly string[] SizeSuffixes = { "bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
|
||||
|
||||
#endregion Public Fields
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Calcola dimensione file automaticamwente secondo dimensione
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="decimalPlaces"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="ArgumentOutOfRangeException"></exception>
|
||||
public static string SizeSuffix(Int64 value, int decimalPlaces = 1)
|
||||
{
|
||||
if (decimalPlaces < 0) { throw new ArgumentOutOfRangeException("decimalPlaces"); }
|
||||
if (value < 0) { return "-" + SizeSuffix(-value, decimalPlaces); }
|
||||
if (value == 0) { return string.Format("{0:n" + decimalPlaces + "} bytes", 0); }
|
||||
|
||||
// mag is 0 for bytes, 1 for KB, 2, for MB, etc.
|
||||
int mag = (int)Math.Log(value, 1024);
|
||||
|
||||
// 1L << (mag * 10) == 2 ^ (10 * mag) [i.e. the number of bytes in the unit
|
||||
// corresponding to mag]
|
||||
decimal adjustedSize = (decimal)value / (1L << (mag * 10));
|
||||
|
||||
// make adjustment when the value is large enough that it would round up to 1000 or more
|
||||
if (Math.Round(adjustedSize, decimalPlaces) >= 1000)
|
||||
{
|
||||
mag += 1;
|
||||
adjustedSize /= 1024;
|
||||
}
|
||||
|
||||
return string.Format("{0:n" + decimalPlaces + "} {1}",
|
||||
adjustedSize,
|
||||
SizeSuffixes[mag]);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Core.Models
|
||||
{
|
||||
public class ControlTarget
|
||||
{
|
||||
[Key]
|
||||
public int Idx { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Tipo applicazione da monitorare
|
||||
/// </summary>
|
||||
public string ApplicationType { get; set; } = "";
|
||||
#if false
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public CoreEnum.AppType ApplicationType { get; set; } = CoreEnum.AppType.None;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Path di base da monitorare
|
||||
/// </summary>
|
||||
public string BasePath { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Pattern di ricerca
|
||||
/// </summary>
|
||||
public string SearchPattern { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Indica se il path sia abilitato
|
||||
/// </summary>
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Indica se sia abilitato l'update x l'item
|
||||
/// </summary>
|
||||
public bool UpdateEnabled { get; set; } = false;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LiMan.UI.Data
|
||||
namespace Core
|
||||
{
|
||||
public class SelectData
|
||||
{
|
||||
@@ -55,4 +56,4 @@ namespace LiMan.UI.Data
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Core.Enum;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
@@ -37,7 +38,7 @@ namespace Core
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
/// Istanzia un nuovo ogetto richeista supporto
|
||||
/// Istanzia un nuovo ogetto richiesta supporto
|
||||
/// </summary>
|
||||
/// <param name="codApp">Codice Applicazione (es EBW-UP)</param>
|
||||
/// <param name="codImp">Codice Impegno (es codice chiave HW)</param>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
{
|
||||
public class UploadResult
|
||||
{
|
||||
public bool Uploaded { get; set; }
|
||||
public string? FileName { get; set; }
|
||||
public string? StoredFileName { get; set; }
|
||||
public int ErrorCode { get; set; }
|
||||
public bool Uploaded { get; set; } = false;
|
||||
public string FileName { get; set; } = "";
|
||||
public string StoredFileName { get; set; } = "";
|
||||
public int ErrorCode { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Core.Enum;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
@@ -11,6 +12,7 @@ namespace Core
|
||||
#region Public Properties
|
||||
|
||||
public string MasterKey { get; set; } = "";
|
||||
public TipoLicenza LicType { get; set; } = TipoLicenza.UserKey;
|
||||
public Dictionary<string, string> ParamDict { get; set; } = new Dictionary<string, string>();
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
public class Utils
|
||||
{
|
||||
/// <summary>
|
||||
/// Effettua arrotondamento di un timespan ad un dato step di minuti
|
||||
///
|
||||
/// vedere qui: https://stackoverflow.com/questions/1393696/rounding-datetime-objects
|
||||
/// </summary>
|
||||
/// <param name="TSpanOrig">DataOra originale</param>
|
||||
/// <param name="roundMin">Minuti di arrotondamento richeisti</param>
|
||||
/// <param name="isFloor">Arrotondamento x difetto (floor = true) o eccesso (false)</param>
|
||||
/// <returns></returns>
|
||||
public static TimeSpan TSpanRounded(TimeSpan TSpanOrig, int roundMin, bool isFloor)
|
||||
{
|
||||
long ticks = 0;
|
||||
roundMin = roundMin <= 0 ? 1 : roundMin;
|
||||
TimeOnly step = new TimeOnly(0, roundMin);
|
||||
if (isFloor)
|
||||
{
|
||||
ticks = TSpanOrig.Ticks / step.Ticks;
|
||||
}
|
||||
else
|
||||
{
|
||||
ticks = (TSpanOrig.Ticks + step.Ticks - 1) / step.Ticks;
|
||||
}
|
||||
TimeSpan answ = new TimeSpan(ticks * step.Ticks);
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua arrotondamento di un timespan ad un dato step di minuti
|
||||
///
|
||||
/// vedere qui: https://stackoverflow.com/questions/1393696/rounding-datetime-objects
|
||||
/// </summary>
|
||||
/// <param name="DateOrig">DataOra originale</param>
|
||||
/// <param name="roundMin">Minuti di arrotondamento richeisti</param>
|
||||
/// <returns></returns>
|
||||
public static TimeSpan TSpanRounded(TimeSpan TSpanOrig, int roundMin)
|
||||
{
|
||||
long ticks = 0;
|
||||
roundMin = roundMin <= 0 ? 1 : roundMin;
|
||||
TimeOnly step = new TimeOnly(0, roundMin);
|
||||
ticks = (TSpanOrig.Ticks + step.Ticks / 2) / step.Ticks;
|
||||
TimeSpan answ = new TimeSpan(ticks * step.Ticks);
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,10 +32,8 @@ namespace Core
|
||||
plainAuthKey = SteamCrypto.DecryptString(authKey, passPhrase); // uso combinazione cliente+applicativo come passphrase!
|
||||
answ = Convert.ToDateTime(plainAuthKey.Replace(string.Format("{0}#{1}-", cliente, applicativo.PadLeft(20, '-')), "").Replace(string.Format("%{0}%", licenze), ""));
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
//logger.lg.scriviLog(string.Format("Errore decodifica auth key:{0}AuthKey: {1}{0}cliente:{2}{0}applicativo:{3}{0}errore:{4}", Environment.NewLine, authKey, cliente, applicativo, exc), tipoLog.EXCEPTION);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,357 @@
|
||||
using Core;
|
||||
using Core.DTO;
|
||||
using ICSharpCode.SharpZipLib.Core;
|
||||
using ICSharpCode.SharpZipLib.Zip;
|
||||
using LiMan.APi.Data;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LiMan.APi.Controllers
|
||||
{
|
||||
[Route("api/apptask")]
|
||||
[ApiController]
|
||||
public class AppTaskController : ControllerBase
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Init generico
|
||||
/// </summary>
|
||||
/// <param name="configuration"></param>
|
||||
/// <param name="DataService"></param>
|
||||
/// <param name="env"></param>
|
||||
public AppTaskController(IConfiguration configuration, ApiDataService DataService, IWebHostEnvironment env)
|
||||
{
|
||||
_configuration = configuration;
|
||||
this.env = env;
|
||||
dataService = DataService;
|
||||
Log.Info("Avviata classe TaskController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Elimina tutte le registrazioni req/run/done x device
|
||||
/// </summary>
|
||||
/// <param name="dev">dev richiedente</param>
|
||||
/// <param name="CurrReq">Obj AuthDataDTO con chiavi (master o app)</param>
|
||||
[HttpDelete("cleanup/{dev}")]
|
||||
public async Task<Dictionary<string, string>> TaskClearAll(string dev, [FromBody] TaskResultDTO CurrReq)
|
||||
{
|
||||
Dictionary<string, string> result = new Dictionary<string, string>();
|
||||
// verifica validità richiesta...
|
||||
if (CurrReq.IsValid)
|
||||
{
|
||||
// FixMe ToDo !!! effettuare verifica valori chiavi/imp/device...
|
||||
|
||||
// elimina tutte le richieste x la macchina...
|
||||
var rawData = dataService.TaskListReset(CurrReq.CodImp);
|
||||
|
||||
// registro updater...
|
||||
dataService.UpdaterRecordAction(CurrReq.CodImp, "TaskClearAll");
|
||||
|
||||
if (rawData != null)
|
||||
{
|
||||
result = rawData;
|
||||
}
|
||||
// salva in redis e toglie dai task da eseguire la richiesta relativa...
|
||||
|
||||
// registro infine chiamata
|
||||
await dataService.recordCall(dev, CurrReq.CodImp, $"POST:api/apptask/clear/ | {CurrReq.MastKey} | {CurrReq.CodImp}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Richiede elenco di task da eseguire x il dev richiedente
|
||||
/// </summary>
|
||||
/// <param name="dev">dev richiedente</param>
|
||||
/// <param name="AppKey">Cod Auth applicativo</param>
|
||||
/// <param name="CodImp">CodImp del dev</param>
|
||||
[HttpGet("pend/{dev}")]
|
||||
public async Task<Dictionary<string, string>> TaskGetPending(string dev, [FromHeader] string AppKey, [FromHeader] string CodImp)
|
||||
//public async Task<ActionResult<Dictionary<string, string>>> TaskGetPending(string dev, [FromHeader] string CodInst, [FromHeader] string CodImp)
|
||||
{
|
||||
Dictionary<string, string> result = new Dictionary<string, string>();
|
||||
// verifica validità richiesta...
|
||||
if (!string.IsNullOrEmpty(AppKey) && !string.IsNullOrEmpty(CodImp))
|
||||
{
|
||||
// FixMe ToDo !!! effettuare verifica valori chiavi/imp/device...
|
||||
|
||||
// recupero da REDIS le richieste pending x la macchina...
|
||||
result = dataService.TaskListGet(CodImp);
|
||||
|
||||
// registro updater...
|
||||
dataService.UpdaterRecordAction(CodImp, "TaskGetPending");
|
||||
|
||||
// registro infine chiamata
|
||||
await dataService.recordCall(dev, CodImp, $"POST:api/apptask/pending/ | {dev} | {CodImp} | {AppKey}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registra risultato esecuzione task richiesti al device
|
||||
/// </summary>
|
||||
/// <param name="dev">dev richiedente</param>
|
||||
/// <param name="CurrReq">Obj AuthDataDTO con chiavi (master o app)</param>
|
||||
[HttpPost("done/{dev}")]
|
||||
public async Task<string> TaskSetDone(string dev, [FromBody] TaskResultDTO CurrReq)
|
||||
{
|
||||
string result = "NA";
|
||||
// verifica validità richiesta...
|
||||
if (CurrReq.IsValid)
|
||||
{
|
||||
// FixMe ToDo !!! effettuare verifica valori chiavi/imp/device...
|
||||
|
||||
// recupero da REDIS le richieste pending x la macchina...
|
||||
int numDone = dataService.TaskSetDone(CurrReq.CodImp, CurrReq.DataPayload);
|
||||
|
||||
// registro updater...
|
||||
dataService.UpdaterRecordAction(CurrReq.CodImp, "TaskSetDone");
|
||||
|
||||
result = $"saved {numDone}/{CurrReq.DataPayload.Count}";
|
||||
// salva in redis e toglie dai task da eseguire la richiesta relativa...
|
||||
|
||||
// registro infine chiamata
|
||||
await dataService.recordCall(CurrReq.CodImp, CurrReq.CodImp, $"POST:api/apptask/done/ | {CurrReq.MastKey} | {CurrReq.CodImp}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registra in esecuzione itask richiesti al device
|
||||
/// </summary>
|
||||
/// <param name="dev">dev richiedente</param>
|
||||
/// <param name="CurrReq">Obj AuthDataDTO con chiavi (master o app)</param>
|
||||
[HttpPost("running/{dev}")]
|
||||
public async Task<string> TaskSetRunning(string dev, [FromBody] TaskResultDTO CurrReq)
|
||||
{
|
||||
string result = "NA";
|
||||
// verifica validità richiesta...
|
||||
if (CurrReq.IsValid)
|
||||
{
|
||||
// FixMe ToDo !!! effettuare verifica valori chiavi/imp/device...
|
||||
|
||||
// recupero da REDIS le richieste pending x la macchina...
|
||||
int numDone = dataService.TaskSetRunning(CurrReq.CodImp, CurrReq.DataPayload);
|
||||
|
||||
// registro updater...
|
||||
dataService.UpdaterRecordAction(CurrReq.CodImp, "TaskSetRunning");
|
||||
|
||||
result = $"saved {numDone}/{CurrReq.DataPayload.Count}";
|
||||
|
||||
// registro infine chiamata
|
||||
await dataService.recordCall(dev, CurrReq.CodImp, $"POST:api/apptask/running/ | {CurrReq.MastKey} | {CurrReq.CodImp}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Caricamento file backup applicativo in formato ZIP via FORM POST (backup configurazione applicativo)
|
||||
/// </summary>
|
||||
/// <param name="CodApp">Applicazione di riferimento</param>
|
||||
/// <param name="AppKey">Chiave istanza</param>
|
||||
/// <param name="CodImp">CodImpiego istanza</param>
|
||||
/// <param name="DoUnzip">Richiesta UnZip file post caricamento</param>
|
||||
/// <param name="ForceApprov">Richiesta di approvazione salvataggio files modificati post upload + unzip</param>
|
||||
/// <param name="ZipFile">File da caricare ed estrarre</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("zipbackup")]
|
||||
public async Task<ActionResult<UploadResult>> ZipFileSaveExtract([FromForm] string CodApp,
|
||||
[FromForm] string AppKey,
|
||||
[FromForm] string CodImp,
|
||||
[FromForm] bool DoUnzip,
|
||||
[FromForm] bool ForceApprov,
|
||||
[FromForm] IFormFile ZipFile)
|
||||
{
|
||||
// preparo oggetti x risposta
|
||||
var resourcePath = new Uri($"{Request.Scheme}://{Request.Host}/api/filesave/");
|
||||
List<UploadResult> uploadResults = new List<UploadResult>();
|
||||
var uploadResult = new UploadResult();
|
||||
string CodInst = "";
|
||||
// max 20 mb
|
||||
long maxFileSize = 1024 * 1024 * 20;
|
||||
// in primis verifica CodImp e AppKey
|
||||
var sLicList = await SubLicGet(AppKey, CodImp);
|
||||
if (sLicList == null || sLicList.Count == 0)
|
||||
{
|
||||
Log.Error($"ZipUpload backup failed: received code not validated | CodApp: {CodApp} | AppKey: {AppKey} | CodImp: {CodImp}");
|
||||
uploadResult.ErrorCode = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
var fRec = sLicList.FirstOrDefault();
|
||||
if (fRec == null || fRec.LicenzaNav == null)
|
||||
{
|
||||
Log.Error($"ZipUpload backup failed: Impossible to find CodInst for current data | CodApp: {CodApp} | AppKey: {AppKey} | CodImp: {CodImp}");
|
||||
uploadResult.ErrorCode = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
CodInst = fRec.LicenzaNav.CodInst;
|
||||
string fileDir = env.ContentRootPath;
|
||||
string relDir = env.EnvironmentName;
|
||||
string authKey = "";
|
||||
uploadResult.FileName = ZipFile.FileName;
|
||||
// controllo size e procedo
|
||||
if (ZipFile.Length == 0)
|
||||
{
|
||||
Log.Info($"{ZipFile.FileName} length is 0 (Err: 1)");
|
||||
uploadResult.ErrorCode = 1;
|
||||
}
|
||||
else if (ZipFile.Length > maxFileSize)
|
||||
{
|
||||
Log.Info($"{ZipFile.FileName} of {CalcSize(ZipFile.Length)} is larger than the limit of {CalcSize(maxFileSize)} (Err: 2)");
|
||||
uploadResult.ErrorCode = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
relDir = _configuration["ServerConf:FileShareAppBackup"];
|
||||
fileDir = Path.Combine(relDir, CodApp, CodInst);
|
||||
if (!Directory.Exists(fileDir))
|
||||
{
|
||||
Directory.CreateDirectory(fileDir);
|
||||
}
|
||||
var filePath = Path.Combine(fileDir, ZipFile.FileName);
|
||||
|
||||
// elimino se ci fosse già il file...
|
||||
if (System.IO.File.Exists(filePath))
|
||||
{
|
||||
System.IO.File.Delete(filePath);
|
||||
}
|
||||
|
||||
// salvo da filestream a file locale
|
||||
using (FileStream fs = new(filePath, FileMode.Create))
|
||||
{
|
||||
await ZipFile.CopyToAsync(fs);
|
||||
}
|
||||
|
||||
// log!
|
||||
Log.Info($"{ZipFile.FileName} saved at {filePath}");
|
||||
uploadResult.Uploaded = true;
|
||||
uploadResult.StoredFileName = ZipFile.FileName;
|
||||
// se richiesto unzip eseguo
|
||||
if (DoUnzip)
|
||||
{
|
||||
bool extractDone = false;
|
||||
// recupero applicativi connessi
|
||||
var listLic = await dataService.AppDtoSearch(CodInst, CodApp, false);
|
||||
var currLic = listLic.Where(x => x.IsActive).FirstOrDefault();
|
||||
// procedo SOLO SE ho una licenza attiva x questo cliente
|
||||
if (currLic != null)
|
||||
{
|
||||
// esegue unzip
|
||||
await Task.Run(() =>
|
||||
{
|
||||
System.IO.Compression.ZipFile.ExtractToDirectory(filePath, fileDir, true);
|
||||
});
|
||||
extractDone = true;
|
||||
|
||||
// elimino zip e altro...
|
||||
if (extractDone)
|
||||
{
|
||||
System.IO.File.Delete(filePath);
|
||||
}
|
||||
|
||||
// se richiesta auto approvazione eseguo...
|
||||
string reqAppFile = Path.Combine(fileDir, "ChangeApprove.req");
|
||||
if (System.IO.File.Exists(reqAppFile))
|
||||
{
|
||||
System.IO.File.Delete(reqAppFile);
|
||||
}
|
||||
if (ForceApprov)
|
||||
{
|
||||
// FixMe ToDo !!!
|
||||
// deve chiamare metodo x approvare, in MP-PROG, la directory dei
|
||||
// documenti caricati.. x ora segnaposto con file (così se scansiona
|
||||
// trova e approva)...
|
||||
System.IO.File.WriteAllText(reqAppFile, authKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Log.Error($"{ZipFile.FileName} error on upload (Err: 3): {ex.Message}");
|
||||
uploadResult.ErrorCode = 3;
|
||||
}
|
||||
}
|
||||
Log.Info($"ZipUpload backup completed | CodInst: {CodInst} | CodApp: {CodApp} | {uploadResults.Count} files");
|
||||
}
|
||||
}
|
||||
uploadResults.Add(uploadResult);
|
||||
|
||||
// registro updater...
|
||||
dataService.UpdaterRecordAction(CodImp, "ZipFileSaveExtract");
|
||||
|
||||
return new CreatedResult(resourcePath, uploadResult);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dataservice x accesso DB
|
||||
/// </summary>
|
||||
protected ApiDataService dataService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce size calcolata
|
||||
/// </summary>
|
||||
/// <param name="origSize"></param>
|
||||
/// <returns></returns>
|
||||
protected string CalcSize(long origSize)
|
||||
{
|
||||
return MeasureUtils.SizeSuffix(origSize, 1);
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration;
|
||||
|
||||
/// <summary>
|
||||
/// Classe per logging
|
||||
/// </summary>
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private readonly IWebHostEnvironment env;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Verifica validità codici
|
||||
/// </summary>
|
||||
/// <param name="AppKey"></param>
|
||||
/// <param name="CodImp"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<List<DB.DBModels.SubLicenzaModel>> SubLicGet(string AppKey, string CodImp)
|
||||
{
|
||||
List<DB.DBModels.SubLicenzaModel> listRes = await dataService.AttivazioniGetAppImp(AppKey, CodImp);
|
||||
return listRes;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ namespace LiMan.APi.Controllers
|
||||
/// <summary>
|
||||
/// Classe per logging
|
||||
/// </summary>
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace LiMan.APi.Controllers
|
||||
[HttpGet("{id}")]
|
||||
public async Task<List<DB.DTO.ApplicativoDTO>> Get(string id, string CodApp)
|
||||
{
|
||||
var result = await dataService.ApplicativiSearch(id, CodApp, true);
|
||||
var result = await dataService.AppDtoSearch(id, CodApp, true);
|
||||
await dataService.recordCall(id, CodApp, $"GET:api/applicazione");
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace LiMan.APi.Controllers
|
||||
/// </summary>
|
||||
// POST api/attivazioni/removeKey
|
||||
[HttpPost("removeKey")]
|
||||
public async Task<bool> Delete([FromBody] UserLicenseRequest CurrRequest)
|
||||
public async Task<bool> removeKey([FromBody] UserLicenseRequest CurrRequest)
|
||||
{
|
||||
bool done = await dataService.AttivazioniDelete(CurrRequest.MasterKey, CurrRequest.ParamDict);
|
||||
// se ho qualcosa da loggare...
|
||||
@@ -93,9 +93,10 @@ namespace LiMan.APi.Controllers
|
||||
public async Task<List<DB.DTO.AttivazioneDTO>> Post([FromBody] UserLicenseRequest CurrRequest)
|
||||
{
|
||||
List<DB.DTO.AttivazioneDTO> currData = new List<DB.DTO.AttivazioneDTO>();
|
||||
|
||||
// giorni veto riattivazione: 60 x lic utente GPW, 7 altrimenti
|
||||
int dayVeto = CurrRequest.LicType == Core.Enum.TipoLicenza.UserKey ? 60 : 7;
|
||||
// eseguo tentativo generazione attivazioni da licenza...
|
||||
bool done = await dataService.AttivazioniTryAdd(CurrRequest.MasterKey, CurrRequest.ParamDict, 60);
|
||||
bool done = await dataService.AttivazioniTryAdd(CurrRequest.MasterKey, CurrRequest.ParamDict, dayVeto, CurrRequest.LicType);
|
||||
currData = await dataService.AttivazioniByMasterKey(CurrRequest.MasterKey, false);
|
||||
// se ho qualcosa da loggare...
|
||||
foreach (var item in CurrRequest.ParamDict)
|
||||
@@ -147,7 +148,7 @@ namespace LiMan.APi.Controllers
|
||||
/// <param name="chiave">Licenza MASTER</param>
|
||||
/// <param name="codImpiego">Codice univoco impiego licenza</param>
|
||||
/// <returns></returns>
|
||||
// GET api/attivazioni/verifica/5
|
||||
// GET api/attivazioni/verifica/5?codImpiego=abcd
|
||||
[HttpGet("verifica")]
|
||||
public async Task<DB.DTO.AttivazioneDTO> VerificaImpiego(string chiave, string codImpiego)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
using LiMan.APi.Data;
|
||||
using LiMan.DbSync.DbModels;
|
||||
using LiMan.DbSync.Services;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LiMan.APi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Controller per sync tabelle standard
|
||||
/// </summary>
|
||||
[Route("api/dbsync")]
|
||||
[ApiController]
|
||||
public class DbSyncController : ControllerBase
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Init generico
|
||||
/// </summary>
|
||||
/// <param name="DataService"></param>
|
||||
public DbSyncController(ApiDataService DataService, DbSyncService SyncService)
|
||||
{
|
||||
mainDataService = DataService;
|
||||
syncDataService = SyncService;
|
||||
Log.Info("Avviata classe DbSyncController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Recupera elenco dati Config x setup locale GET api/dbsync/conf/[id]?[CodApp]
|
||||
/// </summary>
|
||||
/// <param name="id">Codice cliente/Installazione</param>
|
||||
/// <param name="CodApp">Codice Applicazione</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("conf/{id}")]
|
||||
public async Task<List<ConfigModel>> Get(string id, string CodApp)
|
||||
{
|
||||
// ora recupero le info richieste dall'applicativo
|
||||
List<ConfigModel> result = await syncDataService.ConfigGetAll(CodApp);
|
||||
await mainDataService.recordCall(id, CodApp, $"GET:api/dbsync/conf/");
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera elenco dati AnagKeyVal x setup locale GET api/dbsync/anagkeyval/[id]?[CodApp]
|
||||
/// </summary>
|
||||
/// <param name="id">Codice cliente/Installazione</param>
|
||||
/// <param name="CodApp">Codice Applicazione</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("anagkeyval/{id}")]
|
||||
public async Task<List<AnagKeyValueModel>> GetAnagKeyVal(string id, string CodApp)
|
||||
{
|
||||
// ora recupero le info richieste dall'applicativo
|
||||
List<AnagKeyValueModel> result = await syncDataService.AnagKeyValGetAll(CodApp);
|
||||
await mainDataService.recordCall(id, CodApp, $"GET:api/dbsync/anagkeyval/");
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera elenco dati Vocabolario x setup locale GET api/dbsync/anagkeyval/[id]?[CodApp]
|
||||
/// </summary>
|
||||
/// <param name="id">Codice cliente/Installazione</param>
|
||||
/// <param name="CodApp">Codice Applicazione</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("vocabolario/{id}")]
|
||||
public async Task<List<VocabolarioModel>> GetVocabolario(string id, string CodApp)
|
||||
{
|
||||
// ora recupero le info richieste dall'applicativo
|
||||
List<VocabolarioModel> result = await syncDataService.VocabolarioGetAll(CodApp);
|
||||
await mainDataService.recordCall(id, CodApp, $"GET:api/dbsync/vocabolario/");
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dataservice x accesso DB
|
||||
/// </summary>
|
||||
protected ApiDataService mainDataService { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Dataservice x accesso DB
|
||||
/// </summary>
|
||||
protected DbSyncService syncDataService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Private Fields
|
||||
|
||||
/// <summary>
|
||||
/// Classe per logging
|
||||
/// </summary>
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
using Core;
|
||||
using LiMan.APi.Data;
|
||||
using LiMan.DB.DBModels;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LiMan.APi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Controller livello APPLICAZIONE
|
||||
/// </summary>
|
||||
[Route("api/enroller")]
|
||||
[ApiController]
|
||||
public class EnrollerController : ControllerBase
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Init generico
|
||||
/// </summary>
|
||||
/// <param name="DataService"></param>
|
||||
public EnrollerController(ApiDataService DataService)
|
||||
{
|
||||
dataService = DataService;
|
||||
Log.Info("Avviata classe ApplicazioneController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Recupera record di enroll di una richiesta x ricavarne ID licenza da applicare
|
||||
/// </summary>
|
||||
/// <param name="id">ID richiesta</param>
|
||||
/// <param name="passcode">passcode associato</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{id}")]
|
||||
public async Task<EnrollRequestModel> Get(string id, int passcode)
|
||||
{
|
||||
string CodInst = "NA";
|
||||
string CodApp = "Updater";
|
||||
int reqId = 0;
|
||||
int.TryParse(id, out reqId);
|
||||
EnrollRequestModel reqRec = await dataService.EnrollReqGetById(reqId);
|
||||
// solo se il passcode è corretto restituisco record, altrimenti fake one...
|
||||
if (reqRec != null && reqRec.Passcode != passcode)
|
||||
{
|
||||
reqRec = new EnrollRequestModel() { IdReq = reqId };
|
||||
}
|
||||
await dataService.recordCall(CodInst, CodApp, $"GET:api/enroller/{id}");
|
||||
return reqRec;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera record della licenza (mainKey) associata ad una richiesta date le sue info ID, passcode, ID licenza asegnata
|
||||
/// </summary>
|
||||
/// <param name="id">ID richiesta</param>
|
||||
/// <param name="passcode">passcode associato</param>
|
||||
/// <param name="idLic">ID licenza associato</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("getLicense/{id}")]
|
||||
public async Task<LicenzaModel> GetLicData(string id, int passcode, int idLic)
|
||||
{
|
||||
string CodInst = "NA";
|
||||
string CodApp = "Updater";
|
||||
int reqId = 0;
|
||||
int.TryParse(id, out reqId);
|
||||
EnrollRequestModel reqRec = await dataService.EnrollReqGetById(reqId);
|
||||
// init licenza non valida
|
||||
LicenzaModel licRec = new LicenzaModel()
|
||||
{
|
||||
IdxLic = idLic,
|
||||
Chiave = "",
|
||||
CodInst = "NA",
|
||||
CodApp = "None",
|
||||
NumLicenze = 0,
|
||||
Scadenza = DateTime.Today.AddYears(-1),
|
||||
Payload = "",
|
||||
Enigma = ""
|
||||
};
|
||||
// solo se sono corretti passcode e idLic corretto restituisco record, altrimenti fake one...
|
||||
if (reqRec != null && reqRec.Passcode == passcode && reqRec.IdxLic == idLic)
|
||||
{
|
||||
licRec = await dataService.LicenzaById(idLic);
|
||||
CodInst = licRec.CodInst;
|
||||
CodApp = licRec.CodApp;
|
||||
}
|
||||
await dataService.recordCall(CodInst, CodApp, $"GET:api/enroller/getLicense/{id}");
|
||||
return licRec;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Richiesta di un record con codice TOTP per l'enroll di un app client
|
||||
/// </summary>
|
||||
[HttpPost("getNewEnrollRec")]
|
||||
public async Task<EnrollRequestModel> GetNewEnrollRec([FromBody] Dictionary<string, string> MachineInfo)
|
||||
{
|
||||
string CodInst = "NA";
|
||||
string CodApp = "Updater";
|
||||
var newRec = await dataService.EnrollReqCreate(MachineInfo);
|
||||
await dataService.recordCall(CodInst, CodApp, $"GET:api/enroller/GetEnrollRec");
|
||||
return newRec;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dataservice x accesso DB
|
||||
/// </summary>
|
||||
protected ApiDataService dataService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Private Fields
|
||||
|
||||
/// <summary>
|
||||
/// Classe per logging
|
||||
/// </summary>
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
/// <summary>
|
||||
/// Generatore pseudocasuale
|
||||
/// </summary>
|
||||
private Random rnd = new Random();
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using Core;
|
||||
using ICSharpCode.SharpZipLib.Core;
|
||||
using ICSharpCode.SharpZipLib.Zip;
|
||||
using LiMan.APi.Data;
|
||||
using LiMan.DB.DBModels;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
@@ -10,6 +12,7 @@ using NLog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -22,19 +25,6 @@ namespace LiMan.APi.Controllers
|
||||
[Route("api/filesave")]
|
||||
public class FilesaveController : ControllerBase
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration;
|
||||
|
||||
/// <summary>
|
||||
/// Classe per logging
|
||||
/// </summary>
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private readonly IWebHostEnvironment env;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
@@ -53,35 +43,6 @@ namespace LiMan.APi.Controllers
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dataservice x accesso DB
|
||||
/// </summary>
|
||||
protected ApiDataService dataService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Calcolo correetto mimetype da nome file
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <returns></returns>
|
||||
protected string GetMimeType(string fileName)
|
||||
{
|
||||
var provider = new FileExtensionContentTypeProvider();
|
||||
string contentType;
|
||||
if (!provider.TryGetContentType(fileName, out contentType))
|
||||
{
|
||||
contentType = "application/octet-stream";
|
||||
}
|
||||
return contentType;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// GET api/filesave/id/filename
|
||||
@@ -95,7 +56,7 @@ namespace LiMan.APi.Controllers
|
||||
[HttpGet("{id}/{secureName}/{fileName}")]
|
||||
public async Task<ActionResult> DownloadFile(string id, string secureName, string fileName)
|
||||
{
|
||||
string relDir = _configuration["FileShare"];
|
||||
string relDir = _configuration["ServerConf:FileShareTickets"];
|
||||
string ticketDir = Path.Combine(relDir, id);
|
||||
var filePath = Path.Combine(ticketDir, secureName);
|
||||
// verifico esistenza..
|
||||
@@ -111,12 +72,11 @@ namespace LiMan.APi.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco files assaociati a ticket supporto
|
||||
/// Elenco files associati a ticket supporto POST api/filesave/list/1
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="CurrRequest"></param>
|
||||
/// <returns></returns>
|
||||
// POST api/filesave/list/1
|
||||
[HttpPost("list/{id}")]
|
||||
public async Task<List<FileAttachModel>> list(int id, [FromBody] SupportRequest CurrRequest)
|
||||
{
|
||||
@@ -168,7 +128,7 @@ namespace LiMan.APi.Controllers
|
||||
}
|
||||
else if (file.Length > maxFileSize)
|
||||
{
|
||||
Log.Info($"{trustedFileNameForDisplay} of {file.Length} bytes is larger than the limit of {maxFileSize} bytes (Err: 2)");
|
||||
Log.Info($"{trustedFileNameForDisplay} of {CalcSize(file.Length)} is larger than the limit of {CalcSize(maxFileSize)} (Err: 2)");
|
||||
uploadResult.ErrorCode = 2;
|
||||
}
|
||||
else
|
||||
@@ -177,7 +137,7 @@ namespace LiMan.APi.Controllers
|
||||
{
|
||||
DateTime oggi = DateTime.Today;
|
||||
trustedFileNameForFileStorage = Path.GetRandomFileName();
|
||||
relDir = _configuration["FileShare"];
|
||||
relDir = _configuration["ServerConf:FileShareTickets"];
|
||||
fileDir = Path.Combine(relDir, ticketDir);
|
||||
if (!Directory.Exists(fileDir))
|
||||
{
|
||||
@@ -220,7 +180,7 @@ namespace LiMan.APi.Controllers
|
||||
/// Caricamento file effettivo via POST
|
||||
/// </summary>
|
||||
/// <param name="ticketId">TicketId x riferimento</param>
|
||||
/// <param name="files">Elenco files da caricare</param>
|
||||
/// <param name="file">Elenco files da caricare</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("single")]
|
||||
public async Task<ActionResult<UploadResult>> PostSingleFile([FromForm] int ticketId, [FromForm] IFormFile file)
|
||||
@@ -246,7 +206,7 @@ namespace LiMan.APi.Controllers
|
||||
}
|
||||
else if (file.Length > maxFileSize)
|
||||
{
|
||||
Log.Info($"{trustedFileNameForDisplay} of {file.Length} bytes is larger than the limit of {maxFileSize} bytes (Err: 2)");
|
||||
Log.Info($"{trustedFileNameForDisplay} of {CalcSize(file.Length)} is larger than the limit of {CalcSize(maxFileSize)} (Err: 2)");
|
||||
uploadResult.ErrorCode = 2;
|
||||
}
|
||||
else
|
||||
@@ -255,7 +215,7 @@ namespace LiMan.APi.Controllers
|
||||
{
|
||||
DateTime oggi = DateTime.Today;
|
||||
trustedFileNameForFileStorage = Path.GetRandomFileName();
|
||||
relDir = _configuration["FileShare"];
|
||||
relDir = _configuration["ServerConf:FileShareTickets"];
|
||||
fileDir = Path.Combine(relDir, ticketDir);
|
||||
if (!Directory.Exists(fileDir))
|
||||
{
|
||||
@@ -285,6 +245,202 @@ namespace LiMan.APi.Controllers
|
||||
return new CreatedResult(resourcePath, uploadResult);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Caricamento file backup applicativo in formato ZIP via FORM POST (backup configurazione applicativo, file protetto da masterKey)
|
||||
/// </summary>
|
||||
/// <param name="CodApp">Applicazione di riferimento</param>
|
||||
/// <param name="CodInst">Installazione di riferimento</param>
|
||||
/// <param name="DoUnzip">Richiesta UnZip file post caricamento</param>
|
||||
/// <param name="ForceApprov">
|
||||
/// Richiesta di approvazione salvataggio files modificati post upload + unzip
|
||||
/// </param>
|
||||
/// <param name="ZipFile">File da caricare ed estrarre</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("zipbackup")]
|
||||
public async Task<ActionResult<UploadResult>> PostZipFile([FromForm] string CodApp, [FromForm] string CodInst, [FromForm] bool DoUnzip, [FromForm] bool ForceApprov, [FromForm] IFormFile ZipFile)
|
||||
{
|
||||
// max 200 mb
|
||||
long maxFileSize = 1024 * 1024 * 200;
|
||||
// preparo oggetti x risposta
|
||||
var resourcePath = new Uri($"{Request.Scheme}://{Request.Host}/api/filesave/");
|
||||
List<UploadResult> uploadResults = new List<UploadResult>();
|
||||
string fileDir = env.ContentRootPath;
|
||||
string relDir = env.EnvironmentName;
|
||||
string authKey = "";
|
||||
var uploadResult = new UploadResult();
|
||||
uploadResult.FileName = ZipFile.FileName;
|
||||
// controllo size e procedo
|
||||
if (ZipFile.Length == 0)
|
||||
{
|
||||
Log.Info($"{ZipFile.FileName} length is 0 (Err: 1)");
|
||||
uploadResult.ErrorCode = 1;
|
||||
}
|
||||
else if (ZipFile.Length > maxFileSize)
|
||||
{
|
||||
Log.Info($"{ZipFile.FileName} of {CalcSize(ZipFile.Length)} is larger than the limit of {CalcSize(maxFileSize)} (Err: 2)");
|
||||
uploadResult.ErrorCode = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime oggi = DateTime.Today;
|
||||
relDir = _configuration["ServerConf:FileShareAppBackup"];
|
||||
fileDir = Path.Combine(relDir, CodApp, CodInst);
|
||||
if (!Directory.Exists(fileDir))
|
||||
{
|
||||
Directory.CreateDirectory(fileDir);
|
||||
}
|
||||
var filePath = Path.Combine(fileDir, ZipFile.FileName);
|
||||
|
||||
// elimino se ci fosse già il file...
|
||||
if (System.IO.File.Exists(filePath))
|
||||
{
|
||||
System.IO.File.Delete(filePath);
|
||||
}
|
||||
|
||||
// salvo da filestream a file locale
|
||||
using (FileStream fs = new(filePath, FileMode.Create))
|
||||
{
|
||||
await ZipFile.CopyToAsync(fs);
|
||||
}
|
||||
|
||||
// log!
|
||||
Log.Info($"{ZipFile.FileName} saved at {filePath}");
|
||||
uploadResult.Uploaded = true;
|
||||
uploadResult.StoredFileName = ZipFile.FileName;
|
||||
// se richiesto unzip eseguo
|
||||
if (DoUnzip)
|
||||
{
|
||||
bool extractDone = false;
|
||||
// recupero applicativi connessi
|
||||
var listLic = await dataService.AppDtoSearch(CodInst, CodApp, false);
|
||||
var currLic = listLic.Where(x => x.IsActive).FirstOrDefault();
|
||||
// procedo SOLO SE ho una licenza attiva x questo cliente
|
||||
if (currLic != null)
|
||||
{
|
||||
//recupero authKey
|
||||
authKey = currLic.Chiave;
|
||||
using (ZipFile zf = new ZipFile(filePath))
|
||||
{
|
||||
zf.Password = authKey;
|
||||
foreach (ZipEntry zipEntry in zf)
|
||||
{
|
||||
// Manipulate the output filename here as desired.
|
||||
var entryFileName = zipEntry.Name;
|
||||
var fullZipToPath = Path.Combine(fileDir, entryFileName);
|
||||
Console.WriteLine(zipEntry.Name);
|
||||
if (!zipEntry.IsFile)
|
||||
{
|
||||
Directory.CreateDirectory(fullZipToPath);
|
||||
// Ignore directories
|
||||
continue;
|
||||
}
|
||||
|
||||
// 4K is optimum
|
||||
var buffer = new byte[4096];
|
||||
|
||||
// Unzip file in buffered chunks. This is just as fast as
|
||||
// unpacking to a buffer the full size of the file, but does not
|
||||
// waste memory. The "using" will close the stream even if an
|
||||
// exception occurs.
|
||||
using (var zipStream = zf.GetInputStream(zipEntry))
|
||||
{
|
||||
using (Stream fsOutput = System.IO.File.Create(fullZipToPath))
|
||||
{
|
||||
StreamUtils.Copy(zipStream, fsOutput, buffer);
|
||||
}
|
||||
}
|
||||
extractDone = true;
|
||||
}
|
||||
}
|
||||
// elimino zip e altro...
|
||||
if (extractDone)
|
||||
{
|
||||
System.IO.File.Delete(filePath);
|
||||
}
|
||||
|
||||
// se richiesta auto approvazione eseguo...
|
||||
string reqAppFile = Path.Combine(fileDir, "ChangeApprove.req");
|
||||
if (System.IO.File.Exists(reqAppFile))
|
||||
{
|
||||
System.IO.File.Delete(reqAppFile);
|
||||
}
|
||||
if (ForceApprov)
|
||||
{
|
||||
// FixMe ToDo !!!
|
||||
// deve chiamare metodo x approvare, in MP-PROG, la directory dei
|
||||
// documenti caricati.. x ora segnaposto con file (così se scansiona
|
||||
// trova e approva)...
|
||||
System.IO.File.WriteAllText(reqAppFile, authKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Log.Error($"{ZipFile.FileName} error on upload (Err: 3): {ex.Message}");
|
||||
uploadResult.ErrorCode = 3;
|
||||
}
|
||||
}
|
||||
uploadResults.Add(uploadResult);
|
||||
Log.Info($"ZipUpload backup completed | CodInst: {CodInst} | CodApp: {CodApp} | {uploadResults.Count} files");
|
||||
|
||||
return new CreatedResult(resourcePath, uploadResult);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dataservice x accesso DB
|
||||
/// </summary>
|
||||
protected ApiDataService dataService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce size calcolata
|
||||
/// </summary>
|
||||
/// <param name="origSize"></param>
|
||||
/// <returns></returns>
|
||||
protected string CalcSize(long origSize)
|
||||
{
|
||||
return MeasureUtils.SizeSuffix(origSize, 1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calcolo correetto mimetype da nome file
|
||||
/// </summary>
|
||||
/// <param name="fileName"></param>
|
||||
/// <returns></returns>
|
||||
protected string GetMimeType(string fileName)
|
||||
{
|
||||
var provider = new FileExtensionContentTypeProvider();
|
||||
string contentType;
|
||||
if (!provider.TryGetContentType(fileName, out contentType))
|
||||
{
|
||||
contentType = "application/octet-stream";
|
||||
}
|
||||
return contentType;
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration;
|
||||
|
||||
/// <summary>
|
||||
/// Classe per logging
|
||||
/// </summary>
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private readonly IWebHostEnvironment env;
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
using LiMan.APi.Data;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LiMan.APi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Controller livello Health
|
||||
/// </summary>
|
||||
[Route("api/health")]
|
||||
[ApiController]
|
||||
public class HealthController : ControllerBase
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
/// <summary>
|
||||
/// Classe per logging
|
||||
/// </summary>
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Init generico
|
||||
/// </summary>
|
||||
/// <param name="DataService"></param>
|
||||
public HealthController(ApiDataService DataService)
|
||||
{
|
||||
dataService = DataService;
|
||||
Log.Info("Avviata classe HealthController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dataservice x accesso DB
|
||||
/// </summary>
|
||||
protected ApiDataService dataService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// GET api/health
|
||||
/// <summary>
|
||||
/// Recupera elenco applicativi dati cliente
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public ActionResult<string> Get()
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
|
||||
/// GET api/health/id
|
||||
/// <summary>
|
||||
/// Restituisce info riguardo allo stato di salute di un servizio
|
||||
/// </summary>
|
||||
/// <param name="id">Tipo di servizio: db/redis/...</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{id}")]
|
||||
public async Task<string> Get(string id)
|
||||
{
|
||||
string result = "NA";
|
||||
await Task.Delay(1);
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
using Core;
|
||||
using LiMan.APi.Data;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Identity.UI.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NLog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LiMan.APi.Controllers
|
||||
@@ -17,43 +19,30 @@ namespace LiMan.APi.Controllers
|
||||
[ApiController]
|
||||
public class LicenzaController : ControllerBase
|
||||
{
|
||||
#region Private Fields
|
||||
|
||||
/// <summary>
|
||||
/// Classe per logging
|
||||
/// </summary>
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Init generico
|
||||
/// Init Controller Licenze
|
||||
/// </summary>
|
||||
/// <param name="configuration"></param>
|
||||
/// <param name="emailSender"></param>
|
||||
/// <param name="DataService"></param>
|
||||
public LicenzaController(ApiDataService DataService)
|
||||
public LicenzaController(IConfiguration configuration, IEmailSender emailSender, ApiDataService DataService)
|
||||
{
|
||||
_configuration = configuration;
|
||||
_emailSender = emailSender;
|
||||
dataService = DataService;
|
||||
Log.Info("Avviata classe LicenzaController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dataservice x accesso DB
|
||||
/// </summary>
|
||||
protected ApiDataService dataService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// GET api/licenza/id
|
||||
/// <summary>
|
||||
/// Recupera dati Licenza Applicativa (id licenza + num utenze) dati cliente + programma + licenza ATTUALE
|
||||
///
|
||||
/// GET api/licenza/id?CodApp=xxx&Chiave=yyyy
|
||||
/// </summary>
|
||||
/// <param name="id">Codice cliente/Installazione</param>
|
||||
/// <param name="CodApp">Codice Applicazione</param>
|
||||
@@ -67,9 +56,83 @@ namespace LiMan.APi.Controllers
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua verifica scadenze licenze secondo 3 livelli dati da diversi orizzonti temporali
|
||||
/// - urgente: entro 1 settimana
|
||||
/// - importante: entro 1 mese
|
||||
/// - info: entro 2 mesi
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("CheckScadenze")]
|
||||
public async Task<string> Get()
|
||||
{
|
||||
// oggetti base
|
||||
string answ = "ND";
|
||||
string msgBody = "";
|
||||
StringBuilder sbMain = new StringBuilder();
|
||||
StringBuilder sbActions = new StringBuilder();
|
||||
StringBuilder sbAllProj = new StringBuilder();
|
||||
|
||||
// orizzonti da valutare
|
||||
DateTime oggi = DateTime.Today;
|
||||
|
||||
doLog("Esito della verifica Licenze (scadute/in scadenza)", logType.info, ref sbMain);
|
||||
|
||||
// verifico quelle GIA' SCADUTE (< oggi)
|
||||
List<DB.DTO.ApplicativoDTO> elencoScadute = await dataService.LicenzeExpiring(DateTime.MinValue, oggi);
|
||||
List<DB.DTO.ApplicativoDTO> elencoWeek = await dataService.LicenzeExpiring(oggi, oggi.AddDays(8));
|
||||
List<DB.DTO.ApplicativoDTO> elencoMonth = await dataService.LicenzeExpiring(oggi.AddDays(8), oggi.AddDays(1).AddMonths(1));
|
||||
List<DB.DTO.ApplicativoDTO> elencoTrim = await dataService.LicenzeExpiring(oggi.AddDays(1).AddMonths(1), oggi.AddDays(1).AddMonths(3));
|
||||
|
||||
int numScadute = elencoScadute.Count;
|
||||
int numWeek = elencoWeek.Count;
|
||||
int numMonth = elencoMonth.Count;
|
||||
int numTrim = elencoTrim.Count;
|
||||
|
||||
// display scadute scadute...
|
||||
msgBody += formatCheckPeriodo(elencoScadute, "Licenze <b>SCADUTE</b>", "font-size: 1.3em; color: #D62424;");
|
||||
msgBody += formatCheckPeriodo(elencoWeek, "Licenze in scadenza nella <b>SETTIMANA</b>", "font-size: 1.2em; color: #DF701C;");
|
||||
msgBody += formatCheckPeriodo(elencoMonth, "Licenze in scadenza nel <b>MESE</b>", "font-size: 1.15em; color: #A99C45;");
|
||||
msgBody += formatCheckPeriodo(elencoTrim, "Licenze in scadenza nel <b>TRIMESTRE</b>", "font-size: 1.1em; color: #9Dc935;");
|
||||
|
||||
// predispongo email
|
||||
string msgTopic = "LiMan: verifica Licenze in scadenza";
|
||||
|
||||
// invio email
|
||||
string destList = _configuration["MailDest:ExpiryNotify"];
|
||||
await sendEmailExpiry(destList, msgTopic, msgBody.Replace($"{Environment.NewLine}", "<br/>"));
|
||||
|
||||
// ritorno solo LOG azioni
|
||||
answ = $"Scadute {numScadute} | Settimana: {numWeek} | Mese: {numMonth} | Trimestre: {numTrim}";
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Effettua test invio email
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("test-email")]
|
||||
public async Task<string> TestEmail()
|
||||
{
|
||||
// oggetti base
|
||||
string answ = "ND";
|
||||
string msgBody = "Prova invio email a destinatari <b>MailDest:ExpiryNotify</b>";
|
||||
// predispongo email
|
||||
string msgTopic = "LiMan: Test invio email!";
|
||||
|
||||
// invio email
|
||||
string destList = _configuration["MailDest:ExpiryNotify"];
|
||||
await sendEmailExpiry(destList, msgTopic, msgBody.Replace($"{Environment.NewLine}", "<br/>"));
|
||||
|
||||
// ritorno solo LOG azioni
|
||||
answ = $"Test effettuato!";
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// POST api/licenza
|
||||
/// <summary>
|
||||
/// Recupera dati Licenza Applicativa (id licenza + num utenze) dati cliente + programma + licenza ATTUALE
|
||||
/// Recupera dati Licenza Applicativa (id licenza + num utenze) dati cliente + programma +
|
||||
/// licenza ATTUALE
|
||||
/// </summary>
|
||||
/// <param name="AppInfo">Info licenza in formato LicenseCoord</param>
|
||||
/// <returns></returns>
|
||||
@@ -95,5 +158,131 @@ namespace LiMan.APi.Controllers
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Enums
|
||||
|
||||
protected enum logType
|
||||
{
|
||||
none,
|
||||
local,
|
||||
trace,
|
||||
info,
|
||||
warn
|
||||
}
|
||||
|
||||
#endregion Protected Enums
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dataservice x accesso DB
|
||||
/// </summary>
|
||||
protected ApiDataService dataService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
/// <summary>
|
||||
/// Effettua log del tipo richiesto aggiungendo riga anche allo stringbuilder indicato
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="tipoLog"></param>
|
||||
/// <param name="currSB"></param>
|
||||
protected void doLog(string message, logType tipoLog, ref StringBuilder currSB)
|
||||
{
|
||||
bool doLine = true;
|
||||
switch (tipoLog)
|
||||
{
|
||||
case logType.info:
|
||||
Log.Info(message);
|
||||
break;
|
||||
|
||||
case logType.trace:
|
||||
Log.Trace(message);
|
||||
break;
|
||||
|
||||
case logType.warn:
|
||||
Log.Warn(message);
|
||||
break;
|
||||
|
||||
case logType.local:
|
||||
break;
|
||||
|
||||
default:
|
||||
case logType.none:
|
||||
doLine = false;
|
||||
break;
|
||||
}
|
||||
if (doLine)
|
||||
{
|
||||
currSB.AppendLine(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
currSB.Append(message);
|
||||
}
|
||||
}
|
||||
|
||||
protected string formatCheckPeriodo(List<DB.DTO.ApplicativoDTO> elencoLicenze, string tipoVerifica, string titleStyle)
|
||||
{
|
||||
StringBuilder sbMain = new StringBuilder();
|
||||
doLog($"<div style=\"{titleStyle}\">", logType.none, ref sbMain);
|
||||
int numScadute = elencoLicenze.Count;
|
||||
doLog($"{tipoVerifica}: <b>{numScadute}</b>", logType.info, ref sbMain);
|
||||
doLog("<div style=\"font-size: 1em; color: black;\">", logType.none, ref sbMain);
|
||||
if (elencoLicenze.Count == 0)
|
||||
{
|
||||
doLog($" - nessuna", logType.info, ref sbMain);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var item in elencoLicenze)
|
||||
{
|
||||
doLog($" - {item.Scadenza:yyyy.MM.dd} | <b>{item.CodInst}</b> | {item.Descrizione}", logType.info, ref sbMain);
|
||||
}
|
||||
}
|
||||
doLog("</div>", logType.none, ref sbMain);
|
||||
doLog("</div>", logType.none, ref sbMain);
|
||||
return sbMain.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invio email a lista ExpiryNotify
|
||||
/// </summary>
|
||||
/// <param name="destList">Elenco destinatari comma separated</param>
|
||||
/// <param name="subject">Oggetto Email</param>
|
||||
/// <param name="message">MEssaggio</param>
|
||||
/// <returns></returns>
|
||||
protected async Task sendEmailExpiry(string destList, string subject, string message)
|
||||
{
|
||||
List<string> emailDestList = destList.Split(",").ToList();
|
||||
foreach (var dest in emailDestList)
|
||||
{
|
||||
try
|
||||
{
|
||||
await _emailSender.SendEmailAsync(dest, subject, message);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante invio email:{Environment.NewLine}dest: {dest} | subject {subject}{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
/// <summary>
|
||||
/// Classe per logging
|
||||
/// </summary>
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private readonly IEmailSender _emailSender;
|
||||
|
||||
private IConfiguration _configuration;
|
||||
|
||||
#endregion Private Fields
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,426 @@
|
||||
using Core.DTO;
|
||||
using Core;
|
||||
using LiMan.APi.Data;
|
||||
using LiMan.DB.DTO;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NLog;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using LiMan.DB.DBModels;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Org.BouncyCastle.Asn1.Crmf;
|
||||
using System;
|
||||
|
||||
namespace LiMan.APi.Controllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Controller gestione RELEASE applicativi
|
||||
/// </summary>
|
||||
[Route("api/release")]
|
||||
[ApiController]
|
||||
public class ReleaseController : ControllerBase
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Init generico
|
||||
/// </summary>
|
||||
/// <param name="DataService"></param>
|
||||
public ReleaseController(ApiDataService DataService)
|
||||
{
|
||||
dataService = DataService;
|
||||
Log.Info("Avviata classe ReleaseController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Recupera elenco dati Release (rilasciate) GET api/release/EgtBW
|
||||
/// </summary>
|
||||
/// <param name="id">Codice Applicazione</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{id}")]
|
||||
[Obsolete("Please use POST with api/release/getall instead.", false)]
|
||||
public async Task<List<ReleaseDTO>> Get(string id)
|
||||
{
|
||||
var result = await dataService.ReleaseDtoGetByApp(id);
|
||||
await dataService.recordCall(id, id, $"GET:api/release/{id}");
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera elenco dati Release (rilasciate) data versione minima GET api/release/filt/EgtBW
|
||||
/// </summary>
|
||||
/// <param name="id">Codice Applicazione</param>
|
||||
/// <param name="VersMin">Versione minima richiesta (attuale)</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("filt/{id}")]
|
||||
[Obsolete("Please use POST with api/release/getfilt instead.", false)]
|
||||
public async Task<List<ReleaseDTO>> GetFilt(string id, string VersMin)
|
||||
{
|
||||
var result = await dataService.ReleaseDtoGetByAppVers(id, VersMin);
|
||||
Log.Warn($"Chiamato metodo legacy api/release/filt | id: {id} | vers: {VersMin}");
|
||||
await dataService.recordCall(id, id, $"GET:api/release/filt/{id}");
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera elenco dati Release (rilasciate) data versione minima e massima GET api/release/filtLimit/EgtBW
|
||||
/// </summary>
|
||||
/// <param name="id">Codice Applicazione</param>
|
||||
/// <param name="VersMin">Versione minima richiesta (attuale)</param>
|
||||
/// <param name="VersMax">Versione massima consentita</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("filtLimit/{id}")]
|
||||
[Obsolete("Please use POST with api/release/getlimit instead.", false)]
|
||||
public async Task<List<ReleaseDTO>> GetFiltLimit(string id, string VersMin, string VersMax)
|
||||
{
|
||||
var result = await dataService.ReleaseGetByAppVersLimit(id, VersMin, VersMax);
|
||||
await dataService.recordCall(id, id, $"GET:api/release/filtLimit/{id}");
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera elenco dati Release (rilasciate) POST api/release/getall
|
||||
/// </summary>
|
||||
/// <param name="CurrReq">Obj ReleaseReqDTO con chiavi (master o app)</param>
|
||||
[HttpPost("getall")]
|
||||
public async Task<List<ReleaseDTO>> GetReleases([FromBody] ReleaseReqDTO CurrReq)
|
||||
{
|
||||
List<ReleaseDTO> result = new List<ReleaseDTO>();
|
||||
// verifica validità richiesta...
|
||||
if (CheckReqKeys(CurrReq))
|
||||
{
|
||||
result = await dataService.ReleaseDtoGetByApp(CurrReq.CodApp);
|
||||
// non necessario notificare UI...
|
||||
#if false
|
||||
// invio notifica x app...
|
||||
dataService.UpdActMessPipe.sendMessage(CurrReq.CodImp);
|
||||
#endif
|
||||
|
||||
// registro updater...
|
||||
dataService.UpdaterRecordAction(CurrReq.CodImp, "GetReleases");
|
||||
|
||||
await dataService.recordCall(CurrReq.CodApp, CurrReq.CodApp, $"POST:api/release/getall/ | {CurrReq.MastKey} | {CurrReq.CodImp} | {CurrReq.CodApp}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera elenco dati Release CRITICHE rilasciate (se sono ultima per singola CodApp)
|
||||
/// POST api/release/get-critical
|
||||
/// </summary>
|
||||
/// <param name="CurrReq">Obj ReleaseReqDTO con chiavi (master o app)</param>
|
||||
[HttpPost("getcritical")]
|
||||
public async Task<Dictionary<string, ReleaseDTO>> GetReleasesCritical([FromBody] ReleaseReqDTO CurrReq)
|
||||
{
|
||||
Dictionary<string, ReleaseDTO> result = new Dictionary<string, ReleaseDTO>();
|
||||
// verifica validità richiesta...
|
||||
if (CheckReqKeys(CurrReq))
|
||||
{
|
||||
result = await dataService.ReleaseGetCritical();
|
||||
// non necessario notificare UI...
|
||||
#if false
|
||||
// invio notifica x app...
|
||||
dataService.UpdActMessPipe.sendMessage(CurrReq.CodImp);
|
||||
#endif
|
||||
|
||||
// registro updater...
|
||||
dataService.UpdaterRecordAction(CurrReq.CodImp, "GetReleasesCritical");
|
||||
|
||||
await dataService.recordCall(CurrReq.CodApp, CurrReq.CodApp, $"POST:api/release/getcritical/ | {CurrReq.MastKey} | {CurrReq.CodImp} | {CurrReq.CodApp}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera elenco dati Release (rilasciate) data versione minima POST api/release/getfilt
|
||||
/// </summary>
|
||||
/// <param name="CurrReq">Obj ReleaseReqDTO con chiavi (master o app)</param>
|
||||
[HttpPost("getfilt")]
|
||||
public async Task<List<ReleaseDTO>> GetReleasesFilt([FromBody] ReleaseReqDTO CurrReq)
|
||||
{
|
||||
List<ReleaseDTO> result = new List<ReleaseDTO>();
|
||||
// verifica validità richiesta...
|
||||
if (CheckReqKeys(CurrReq))
|
||||
{
|
||||
result = await dataService.ReleaseDtoGetByAppVers(CurrReq.CodApp, CurrReq.VersMin);
|
||||
// registro stato applicativi (da richiesta...)
|
||||
InstalledReleasesModel checkRec = new InstalledReleasesModel()
|
||||
{
|
||||
AppKey = CurrReq.AppKey,
|
||||
CodApp = CurrReq.CodApp,
|
||||
CodImp = CurrReq.CodImp,
|
||||
DtCheck = DateTime.Now,
|
||||
MastKey = CurrReq.MastKey,
|
||||
NumImp = CurrReq.NumImp,
|
||||
VersNum = CurrReq.VersMin
|
||||
};
|
||||
bool changed = dataService.InstallRelUpsert(checkRec);
|
||||
// chiamata x effettuare eventuale snapshot sulle installazioni attive SE variato
|
||||
await dataService.InstallRelHistSnapshot(changed);
|
||||
if (changed)
|
||||
{
|
||||
// invio notifica x app...
|
||||
dataService.UpdActMessPipe.sendMessage(CurrReq.CodImp);
|
||||
}
|
||||
|
||||
// registro updater...
|
||||
dataService.UpdaterRecordAction(CurrReq.CodImp, "GetReleasesFilt");
|
||||
|
||||
// registro infine chiamata
|
||||
await dataService.recordCall(CurrReq.CodApp, CurrReq.CodApp, $"POST:api/release/getfilt/ | {CurrReq.MastKey} | {CurrReq.CodImp} | {CurrReq.CodApp}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recupera elenco dati Release (rilasciate) data versione minima e massima POST api/release/getlimit
|
||||
/// </summary>
|
||||
/// <param name="CurrReq">Obj ReleaseReqDTO con chiavi (master o app)</param>
|
||||
[HttpPost("getlimit")]
|
||||
public async Task<List<ReleaseDTO>> GetReleasesLimit([FromBody] ReleaseReqDTO CurrReq)
|
||||
{
|
||||
List<ReleaseDTO> result = new List<ReleaseDTO>();
|
||||
// verifica validità richiesta...
|
||||
if (CheckReqKeys(CurrReq))
|
||||
{
|
||||
result = await dataService.ReleaseGetByAppVersLimit(CurrReq.CodApp, CurrReq.VersMin, CurrReq.VersMax);
|
||||
#if false
|
||||
// invio notifica x app...
|
||||
dataService.UpdActMessPipe.sendMessage(CurrReq.CodImp);
|
||||
#endif
|
||||
// registro updater...
|
||||
dataService.UpdaterRecordAction(CurrReq.CodImp, "GetReleasesLimit");
|
||||
|
||||
await dataService.recordCall(CurrReq.CodApp, CurrReq.CodApp, $"POST:api/release/getlimit/ | {CurrReq.MastKey} | {CurrReq.CodImp} | {CurrReq.CodApp}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Salva una nuova release dell'applicativo (eventualmente sovrascrivendo) POST api/release/save
|
||||
/// </summary>
|
||||
/// <param name="CurrReq">Obj Richiesta</param>
|
||||
[HttpPost("save")]
|
||||
public async Task<ReleaseDTO> SaveRelease([FromBody] AppRelVersion CurrReq)
|
||||
{
|
||||
ReleaseDTO result = new ReleaseDTO()
|
||||
{
|
||||
CodApp = CurrReq.CodApp,
|
||||
ReleaseDate = CurrReq.ReleaseDate,
|
||||
VersNum = CurrReq.VersNum,
|
||||
VersText = CurrReq.VersText,
|
||||
RelTags = CurrReq.RelTags.ToUpper()
|
||||
};
|
||||
// controllo valori
|
||||
if (CurrReq.IsValid)
|
||||
{
|
||||
// verifica preliminare licenza x upload
|
||||
var licUploader = await dataService.LicenzeSearch(CurrReq.CodInst, CurrReq.UplAppID, CurrReq.MasterKey, false);
|
||||
if (licUploader != null && licUploader.Count > 0)
|
||||
{
|
||||
// in primis cerco app...
|
||||
var appList = await dataService.ApplicNextGetAll(true);
|
||||
ApplicativoModel recApp = new ApplicativoModel();
|
||||
if (appList != null)
|
||||
{
|
||||
recApp = appList.FirstOrDefault(x => x.CodApp == CurrReq.CodApp);
|
||||
}
|
||||
// nel caso mancasse la aggiungo
|
||||
if (recApp == null || string.IsNullOrEmpty(recApp.CodApp) || recApp.CodApp != CurrReq.CodApp)
|
||||
{
|
||||
recApp = new ApplicativoModel()
|
||||
{
|
||||
CodApp = CurrReq.CodApp,
|
||||
Descrizione = "Nuova APP da POST api/release/save",
|
||||
TplConnString = "",
|
||||
Tipo = CurrReq.Tipo
|
||||
};
|
||||
await dataService.ApplicNextUpdate(recApp);
|
||||
}
|
||||
//converto in una release...
|
||||
ReleaseModel newRec = new ReleaseModel()
|
||||
{
|
||||
CodApp = CurrReq.CodApp,
|
||||
ReleaseDate = CurrReq.ReleaseDate,
|
||||
RelTags = CurrReq.RelTags.ToUpper(),
|
||||
VersNum = CurrReq.VersNum,
|
||||
VersText = CurrReq.VersText
|
||||
};
|
||||
// registro versione eventualmente gestendo nuovo applicativo
|
||||
var insRes = await dataService.ReleaseUpsert(newRec);
|
||||
if (insRes)
|
||||
{
|
||||
Log.Info($"Release recorded | {CurrReq.CodApp} | {CurrReq.VersNum} | {CurrReq.VersText} | {CurrReq.ReleaseDate} | {CurrReq.RelTags}");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Errore: licenza UpdateManager non TROVATA | {CurrReq.MasterKey}");
|
||||
await dataService.recordCall(CurrReq.CodInst, CurrReq.CodApp, $"ERROR POST:api/release/save:{CurrReq.CodApp} | {CurrReq.MasterKey}");
|
||||
}
|
||||
// recupero vers applicativo...
|
||||
var rawResult = await dataService.ReleaseDtoGetByApp(CurrReq.CodApp);
|
||||
if (rawResult != null && rawResult.Count > 0)
|
||||
{
|
||||
result = rawResult.Where(x => x.VersText == CurrReq.VersText).FirstOrDefault();
|
||||
}
|
||||
|
||||
// fisso nostra install
|
||||
await dataService.recordCall(CurrReq.CodInst, CurrReq.CodApp, $"POST:api/release/save:{CurrReq.CodApp}");
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Errore: licenza UpdateManager non VALIDA | {CurrReq.MasterKey}");
|
||||
await dataService.recordCall(CurrReq.CodInst, CurrReq.CodApp, $"ERROR POST:api/release/save:{CurrReq.CodApp} | {CurrReq.MasterKey}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Esegue tentativo salvataggio rel history
|
||||
/// </summary>
|
||||
/// <param name="CurrReq">Obj ReleaseReqDTO con chiavi (master o app)</param>
|
||||
[HttpPost("save-history")]
|
||||
public async Task<List<ReleaseDTO>> SaveRelHistory([FromBody] ReleaseReqDTO CurrReq)
|
||||
{
|
||||
List<ReleaseDTO> result = new List<ReleaseDTO>();
|
||||
// verifica validità richiesta...
|
||||
if (CheckReqKeys(CurrReq))
|
||||
{
|
||||
// chiamata x effettuare eventuale snapshot sulle installazioni attive
|
||||
await dataService.InstallRelHistSnapshot(true);
|
||||
|
||||
// registro updater...
|
||||
dataService.UpdaterRecordAction(CurrReq.CodImp, "SaveRelHistory");
|
||||
|
||||
// registro infine chiamata
|
||||
await dataService.recordCall(CurrReq.CodApp, CurrReq.CodApp, $"POST:api/release/save-history/ | {CurrReq.MastKey} | {CurrReq.CodImp} | {CurrReq.CodApp}");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Conferma quale sia l'elenco delle app gestite POST api/release/setmanaged
|
||||
/// </summary>
|
||||
/// <param name="CurrReq">Obj ManDeclareDTO con chiavi + elenco app gestite (x eliminare altre)</param>
|
||||
/// <returns>Numero di record eliminati</returns>
|
||||
[HttpPost("setmanaged")]
|
||||
public async Task<int> SetManaged([FromBody] ManDeclareDTO CurrReq)
|
||||
{
|
||||
int result = 0;
|
||||
// verifica validità richiesta...
|
||||
if (CheckReqKeys(CurrReq))
|
||||
{
|
||||
result = dataService.InstallRelClean(CurrReq.CodImp, CurrReq.AppKey, CurrReq.ListCodApp);
|
||||
|
||||
// registro updater...
|
||||
dataService.UpdaterRecordAction(CurrReq.CodImp, "SetManaged");
|
||||
|
||||
// invio notifica x app...
|
||||
dataService.UpdActMessPipe.sendMessage(CurrReq.CodImp);
|
||||
}
|
||||
await Task.Delay(1);
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
/// <summary>
|
||||
/// Dataservice x accesso DB
|
||||
/// </summary>
|
||||
protected ApiDataService dataService { get; set; }
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Private Fields
|
||||
|
||||
/// <summary>
|
||||
/// Classe per logging
|
||||
/// </summary>
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Verifica validità richiesta
|
||||
/// - dati presenti in chiamata
|
||||
/// - combinazioni CodApp + chiavi valide/attive
|
||||
/// </summary>
|
||||
/// <param name="currReq"></param>
|
||||
/// <returns></returns>
|
||||
private bool CheckReqKeys(ReleaseReqDTO currReq)
|
||||
{
|
||||
bool answ = currReq.IsValid;
|
||||
if (answ)
|
||||
{
|
||||
// verifica validità chiavi... TBD!!!
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica validità richiesta
|
||||
/// - dati presenti in chiamata
|
||||
/// - combinazioni CodApp + chiavi valide/attive
|
||||
/// </summary>
|
||||
/// <param name="currReq"></param>
|
||||
/// <returns></returns>
|
||||
private bool CheckReqKeys(AuthDataDTO currReq)
|
||||
{
|
||||
bool answ = currReq.IsValid;
|
||||
if (answ)
|
||||
{
|
||||
// verifica validità chiavi... TBD!!!
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifica validità richiesta
|
||||
/// - dati presenti in chiamata
|
||||
/// - combinazioni CodApp + chiavi valide/attive
|
||||
/// </summary>
|
||||
/// <param name="currReq"></param>
|
||||
/// <returns></returns>
|
||||
private bool CheckReqKeys(ManDeclareDTO currReq)
|
||||
{
|
||||
bool answ = currReq.IsValid;
|
||||
if (answ)
|
||||
{
|
||||
// verifica validità chiavi... TBD!!!
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Verifica validità richiesta
|
||||
/// - dati presenti in chiamata
|
||||
/// - combinazioni CodApp + chiavi valide/attive
|
||||
/// </summary>
|
||||
/// <param name="currReq"></param>
|
||||
/// <returns></returns>
|
||||
private bool CheckReqKeys(TaskResultDTO currReq)
|
||||
{
|
||||
bool answ = currReq.IsValid;
|
||||
if (answ)
|
||||
{
|
||||
// verifica validità chiavi... TBD!!!
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
+505
-697
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
@@ -6,31 +6,45 @@
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DocumentationFile>C:\Users\samuele\source\repos\LiManApp\LiMan.Api\LiMan.APi.xml</DocumentationFile>
|
||||
<Optimize>true</Optimize>
|
||||
<Optimize>False</Optimize>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<Optimize>True</Optimize>
|
||||
<DebugType>none</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS03.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS04.pubxml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Properties\PublishProfiles\IIS01.pubxml.user" />
|
||||
<None Include="Properties\PublishProfiles\IIS02.pubxml.user" />
|
||||
<None Include="Properties\PublishProfiles\IIS03.pubxml.user" />
|
||||
<None Include="Properties\PublishProfiles\IIS04.pubxml.user" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.14.0" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.2.88" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.28" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.11" />
|
||||
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.10.1" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.AspNetCore" Version="7.1.1" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.Newtonsoft" Version="7.1.1" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.6.3" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.6.2" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.36.0" />
|
||||
<PackageReference Include="System.Text.Encodings.Web" Version="6.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\LiMan.DbSync\LiMan.DbSync.csproj" />
|
||||
<ProjectReference Include="..\LiMan.DB\LiMan.DB.csproj" />
|
||||
<ProjectReference Include="..\LiMan.GLS\LiMan.GLS.csproj" />
|
||||
</ItemGroup>
|
||||
@@ -43,4 +57,7 @@
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
Caricamento file effettivo via POST
|
||||
</summary>
|
||||
<param name="ticketId">TicketId x riferimento</param>
|
||||
<param name="files">Elenco files da caricare</param>
|
||||
<param name="file">Elenco files da caricare</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:LiMan.APi.Controllers.InstallazioniController">
|
||||
@@ -560,7 +560,7 @@
|
||||
</member>
|
||||
<member name="M:LiMan.APi.Data.ApiDataService.TicketAdd(Core.SupportRequest)">
|
||||
<summary>
|
||||
Esegue aggiunta Ticket richeisto + restitusice aperti x cliente
|
||||
Esegue aggiunta Ticket richiesto + restitusice aperti x cliente
|
||||
</summary>
|
||||
<param name="currRequest"></param>
|
||||
<returns></returns>
|
||||
@@ -576,7 +576,7 @@
|
||||
<param name="numRec"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:LiMan.APi.Data.ApiDataService.TicketUpdateState(System.Int32,Core.StatoRichiesta)">
|
||||
<member name="M:LiMan.APi.Data.ApiDataService.TicketUpdateState(System.Int32,Core.Enum.StatoRichiesta)">
|
||||
<summary>
|
||||
Aggiornamentos tato ticket
|
||||
</summary>
|
||||
|
||||
@@ -7,6 +7,7 @@ by editing this MSBuild file. In order to learn more about this please visit htt
|
||||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAk75miMJLMkCTEelQutKpbwAAAAACAAAAAAADZgAAwAAAABAAAADyvXRKpxfDWrEi+5cXyVPMAAAAAASAAACgAAAAEAAAAMRndt7QRE05+xDzpFe1wWwYAAAAfM5H5MJhxE4ciNpDlKikQFw6IBALwdj0FAAAAI8ZWcD16VBpqPQZ+tg+phFYzX1T</EncryptedPassword>
|
||||
<History>True|2022-02-04T09:39:26.3565661Z;False|2022-02-04T10:38:16.4000573+01:00;False|2022-02-04T10:31:02.8361162+01:00;False|2022-02-04T10:29:23.4973985+01:00;False|2022-02-04T10:28:21.1773984+01:00;False|2022-02-04T10:25:50.0542905+01:00;False|2022-02-04T10:23:45.1840125+01:00;False|2022-02-04T10:23:24.8448115+01:00;False|2022-02-04T10:22:15.7243050+01:00;False|2022-02-04T10:21:53.7185925+01:00;False|2022-02-04T10:15:28.7942817+01:00;False|2022-02-04T10:12:36.7104601+01:00;True|2022-02-02T11:24:58.6066960+01:00;False|2021-11-16T14:49:02.9625741+01:00;True|2021-11-09T12:19:38.4459836+01:00;True|2021-11-09T12:19:33.2695831+01:00;True|2021-11-09T12:09:32.8676673+01:00;True|2021-11-09T12:09:26.5263401+01:00;True|2021-11-09T12:09:20.3614911+01:00;True|2021-10-15T10:15:10.5127570+02:00;False|2021-10-15T10:13:53.0299219+02:00;False|2021-10-15T08:58:38.3028788+02:00;False|2021-10-15T08:47:48.5789826+02:00;False|2021-10-14T19:32:56.5281204+02:00;False|2021-10-14T19:31:10.1629370+02:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00;</History>
|
||||
<History>True|2023-02-03T18:35:00.4015320Z;True|2022-02-04T10:39:26.3565661+01:00;False|2022-02-04T10:38:16.4000573+01:00;False|2022-02-04T10:31:02.8361162+01:00;False|2022-02-04T10:29:23.4973985+01:00;False|2022-02-04T10:28:21.1773984+01:00;False|2022-02-04T10:25:50.0542905+01:00;False|2022-02-04T10:23:45.1840125+01:00;False|2022-02-04T10:23:24.8448115+01:00;False|2022-02-04T10:22:15.7243050+01:00;False|2022-02-04T10:21:53.7185925+01:00;False|2022-02-04T10:15:28.7942817+01:00;False|2022-02-04T10:12:36.7104601+01:00;True|2022-02-02T11:24:58.6066960+01:00;False|2021-11-16T14:49:02.9625741+01:00;True|2021-11-09T12:19:38.4459836+01:00;True|2021-11-09T12:19:33.2695831+01:00;True|2021-11-09T12:09:32.8676673+01:00;True|2021-11-09T12:09:26.5263401+01:00;True|2021-11-09T12:09:20.3614911+01:00;True|2021-10-15T10:15:10.5127570+02:00;False|2021-10-15T10:13:53.0299219+02:00;False|2021-10-15T08:58:38.3028788+02:00;False|2021-10-15T08:47:48.5789826+02:00;False|2021-10-14T19:32:56.5281204+02:00;False|2021-10-14T19:31:10.1629370+02:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<AllowUntrustedCertificate>true</AllowUntrustedCertificate>
|
||||
<WebPublishMethod>MSDeploy</WebPublishMethod>
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish>liman.egalware.com/ELM.API</SiteUrlToLaunchAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<ProjectGuid>34200ca2-489c-435a-a60b-34de7b7ba04d</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<MSDeployServiceURL>https://office.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<DeployIisAppPath>liman.egalware.com/ELM.API</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
<EnableMSDeployBackup>true</EnableMSDeployBackup>
|
||||
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
|
||||
<UserName>jenkins</UserName>
|
||||
<_SavePWD>true</_SavePWD>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAk75miMJLMkCTEelQutKpbwAAAAACAAAAAAADZgAAwAAAABAAAADyvXRKpxfDWrEi+5cXyVPMAAAAAASAAACgAAAAEAAAAMRndt7QRE05+xDzpFe1wWwYAAAAfM5H5MJhxE4ciNpDlKikQFw6IBALwdj0FAAAAI8ZWcD16VBpqPQZ+tg+phFYzX1T</EncryptedPassword>
|
||||
<History>True|2023-03-14T13:23:13.2505933Z;True|2023-03-14T14:22:47.9125658+01:00;True|2023-02-03T19:35:00.4015320+01:00;True|2022-02-04T10:39:26.3565661+01:00;False|2022-02-04T10:38:16.4000573+01:00;False|2022-02-04T10:31:02.8361162+01:00;False|2022-02-04T10:29:23.4973985+01:00;False|2022-02-04T10:28:21.1773984+01:00;False|2022-02-04T10:25:50.0542905+01:00;False|2022-02-04T10:23:45.1840125+01:00;False|2022-02-04T10:23:24.8448115+01:00;False|2022-02-04T10:22:15.7243050+01:00;False|2022-02-04T10:21:53.7185925+01:00;False|2022-02-04T10:15:28.7942817+01:00;False|2022-02-04T10:12:36.7104601+01:00;True|2022-02-02T11:24:58.6066960+01:00;False|2021-11-16T14:49:02.9625741+01:00;True|2021-11-09T12:19:38.4459836+01:00;True|2021-11-09T12:19:33.2695831+01:00;True|2021-11-09T12:09:32.8676673+01:00;True|2021-11-09T12:09:26.5263401+01:00;True|2021-11-09T12:09:20.3614911+01:00;True|2021-10-15T10:15:10.5127570+02:00;False|2021-10-15T10:13:53.0299219+02:00;False|2021-10-15T08:58:38.3028788+02:00;False|2021-10-15T08:47:48.5789826+02:00;False|2021-10-14T19:32:56.5281204+02:00;False|2021-10-14T19:31:10.1629370+02:00;True|2021-05-26T19:49:30.0427896+02:00;False|2021-05-26T19:49:14.9065510+02:00;True|2021-05-25T17:48:33.3901785+02:00;True|2021-05-25T17:46:09.2063020+02:00;True|2021-05-25T17:42:47.8167539+02:00;True|2021-05-25T17:22:03.1877438+02:00;True|2021-05-25T17:21:05.1565775+02:00;True|2021-05-25T16:26:34.1426996+02:00;True|2021-05-25T16:14:28.2842402+02:00;True|2021-05-25T15:02:11.7131495+02:00;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -22,7 +22,7 @@
|
||||
"dotnetRunMessages": "true",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://localhost:5001;http://localhost:5000",
|
||||
"applicationUrl": "https://localhost:5003;http://localhost:5002",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
<body>
|
||||
<i>License Manager</i>
|
||||
<h4>Versione: {{CURRENT-REL}}</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
<b>Ultime modifiche:</b>
|
||||
<ul>{{LAST-CHANGES}}</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.1.* →</b>
|
||||
<ul>
|
||||
<li>Nuova release dotnet6</li>
|
||||
<li>Prima release dotnet5</li>
|
||||
<li>Integrazione EFCore</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<img src="logoSteamware.png" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<a href="https://www.steamware.net/" target="_blank">© Steamware 2006-2021</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
@@ -0,0 +1,27 @@
|
||||
<body>
|
||||
<i>License Manager</i>
|
||||
<h4>Versione: 2.1.2512.0409</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
<b>Ultime modifiche:</b>
|
||||
<ul>{{LAST-CHANGES}}</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.1.* →</b>
|
||||
<ul>
|
||||
<li>Nuova release dotnet6</li>
|
||||
<li>Prima release dotnet5</li>
|
||||
<li>Integrazione EFCore</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<img src="logoSteamware.png" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<a href="https://www.steamware.net/" target="_blank">© Steamware 2006-2021</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
@@ -0,0 +1 @@
|
||||
2.1.2512.0409
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.0.0</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/{{PACKNAME}}.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
</item>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>2.1.2512.0409</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.UI.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
</item>
|
||||
+65
-23
@@ -1,5 +1,6 @@
|
||||
using LiMan.APi.Data;
|
||||
using LiMan.DB;
|
||||
using LiMan.DbSync.Services;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
@@ -9,6 +10,7 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.FileProviders;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using StackExchange.Redis;
|
||||
using StackExchange.Redis.Extensions.Core.Configuration;
|
||||
using StackExchange.Redis.Extensions.Newtonsoft;
|
||||
using System;
|
||||
@@ -40,19 +42,20 @@ namespace LiMan.Serv
|
||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
|
||||
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
if (env.IsDevelopment())
|
||||
if (env.IsDevelopment() || env.IsStaging())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
|
||||
app.UseSwagger(c =>
|
||||
{
|
||||
c.RouteTemplate = "/swagger/{documentName}/swagger.json";
|
||||
});
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint("v1/swagger.json", "LiMan.Api");
|
||||
});
|
||||
// valido solo in sviluppo
|
||||
app.UseSwagger(c =>
|
||||
{
|
||||
c.RouteTemplate = "/swagger/{documentName}/swagger.json";
|
||||
});
|
||||
app.UseSwaggerUI(c =>
|
||||
{
|
||||
c.SwaggerEndpoint("v1/swagger.json", "LiMan.Api");
|
||||
});
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
@@ -60,14 +63,39 @@ namespace LiMan.Serv
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.UseFileServer(new FileServerOptions
|
||||
// verifico da conf se sia linux o windows x file da accedere...
|
||||
if (Configuration["HostOs"] == "Win")
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(@"\\stor01\TEAM DRIVES\40_FileUpload\unsafe_uploads"),
|
||||
RequestPath = new PathString("/unsafe_uploads"),
|
||||
EnableDirectoryBrowsing = true
|
||||
//EnableDirectoryBrowsing = false
|
||||
});
|
||||
|
||||
app.UseFileServer(new FileServerOptions
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(@"\\stor01\TEAM DRIVES\40_FileUpload\unsafe_uploads"),
|
||||
RequestPath = new PathString("/unsafe_uploads"),
|
||||
EnableDirectoryBrowsing = true
|
||||
//EnableDirectoryBrowsing = false
|
||||
});
|
||||
app.UseFileServer(new FileServerOptions
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(@"\\stor01\TEAM DRIVES\40_FileUpload\AppBackup"),
|
||||
RequestPath = new PathString("/app_backup"),
|
||||
EnableDirectoryBrowsing = false
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
app.UseFileServer(new FileServerOptions
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(Path.Combine(env.ContentRootPath, "unsafe_uploads")),
|
||||
RequestPath = new PathString("/unsafe_uploads"),
|
||||
EnableDirectoryBrowsing = true
|
||||
//EnableDirectoryBrowsing = false
|
||||
});
|
||||
app.UseFileServer(new FileServerOptions
|
||||
{
|
||||
FileProvider = new PhysicalFileProvider(Path.Combine(env.ContentRootPath, "app_backup")),
|
||||
RequestPath = new PathString("/app_backup"),
|
||||
EnableDirectoryBrowsing = false
|
||||
});
|
||||
}
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
@@ -94,25 +122,39 @@ namespace LiMan.Serv
|
||||
options.Host_Address = Configuration["ExternalProviders:MailKit:SMTP:Address"];
|
||||
options.Host_Port = Convert.ToInt32(Configuration["ExternalProviders:MailKit:SMTP:Port"]);
|
||||
options.Host_Username = Configuration["ExternalProviders:MailKit:SMTP:Account"];
|
||||
options.Host_Password = Configuration["ExternalProviders:MailKit:SMTP:Password"];
|
||||
options.Host_Password = Configuration["ExternalProviders:MailKit:SMTP:Password"] ?? "";
|
||||
options.Sender_EMail = Configuration["ExternalProviders:MailKit:SMTP:SenderEmail"];
|
||||
options.Sender_Name = Configuration["ExternalProviders:MailKit:SMTP:SenderName"];
|
||||
options.Host_SecureSocketOptions = MailKit.Security.SecureSocketOptions.Auto;
|
||||
});
|
||||
|
||||
//services.AddStackExchangeRedisCache(options =>
|
||||
//{
|
||||
// options.Configuration = Configuration.GetConnectionString("Redis");
|
||||
//});
|
||||
|
||||
services.AddControllers()
|
||||
.AddJsonOptions(c => c.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.Preserve);
|
||||
|
||||
services.AddSingleton<ApiDataService>();
|
||||
|
||||
services.AddStackExchangeRedisExtensions<NewtonsoftSerializer>((options) =>
|
||||
{
|
||||
return Configuration.GetSection("Redis").Get<RedisConfiguration>();
|
||||
});
|
||||
|
||||
services.AddSingleton<ApiDataService>();
|
||||
|
||||
// REDIS setup
|
||||
var redisConnString = Configuration.GetConnectionString("Redis");
|
||||
string connStringRedis = redisConnString ?? "localhost:6379, DefaultDatabase=1, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false";
|
||||
string redisSrvAddr = "127.0.0.1";
|
||||
if (connStringRedis.IndexOf(":") >= 0)
|
||||
{
|
||||
redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"));
|
||||
}
|
||||
// avvio oggetto shared x redis...
|
||||
var redisMultiplexer = ConnectionMultiplexer.Connect(connStringRedis);
|
||||
// Add services x accesso dati
|
||||
services.AddSingleton<IConnectionMultiplexer>(redisMultiplexer);
|
||||
|
||||
// aggiungo servizio sync DB
|
||||
services.AddSingleton<DbSyncService>();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"DetailedErrors": true,
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"Environment": "PROD"
|
||||
"DetailedErrors": true,
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"Environment": "PROD",
|
||||
"HostOs": "Win"
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"DetailedErrors": true,
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"Environment": "STAG"
|
||||
"DetailedErrors": true,
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"Environment": "STAG",
|
||||
"HostOs": "Win"
|
||||
}
|
||||
+15
-10
@@ -8,25 +8,26 @@
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"LiMan.GLS": "Server=SQLSTEAM;Database=SteamWare_Auth;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.API;",
|
||||
"LiMan.DB": "Server=SQLSTEAM;Database=LiMan.DB;User ID=sa;Password=keyhammer;integrated security=False;MultipleActiveResultSets=True;App=LiMan.API;",
|
||||
"Redis": "localhost:6379,DefaultDatabase=13"
|
||||
"LiMan.GLS": "Server=W2019-SQL-STEAM;Database=SteamWare_Auth;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=LiMan.API;",
|
||||
"LiMan.DB": "Server=W2019-SQL-STEAM;Database=LiMan.DB;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=LiMan.API;",
|
||||
"Redis": "redis.ufficio:26379, serviceName=prod, DefaultDatabase=13, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG"
|
||||
},
|
||||
"ExternalProviders": {
|
||||
"MailKit": {
|
||||
"SMTP": {
|
||||
"Address": "smtp.gmail.com",
|
||||
"Port": "465",
|
||||
"Account": "steamwarebot@gmail.com",
|
||||
"Password": "drmfsls16",
|
||||
"SenderEmail": "steamwarebot@gmail.com",
|
||||
"Port": "587",
|
||||
"Account": "services@steamware.net",
|
||||
"Password": "ruejpcwgycvbmmsr",
|
||||
"SenderEmail": "services@steamware.net",
|
||||
"SenderName": "Steamware Email BOT"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MailDest": {
|
||||
"Admin": "samuele@steamware.net",
|
||||
"ProcOp": "ceo@steamware.net"
|
||||
"ExpiryNotify": "samuele.locatelli@egalware.com,mara.baroni@egalware.com",
|
||||
"TicketNotify": "samuele.locatelli@egalware.com, info@egalware.com"
|
||||
},
|
||||
"Redis": {
|
||||
"Password": "",
|
||||
@@ -42,6 +43,10 @@
|
||||
],
|
||||
"Database": 14
|
||||
},
|
||||
"FileShare": "\\\\stor01\\TEAM DRIVES\\40_FileUpload\\unsafe_uploads",
|
||||
"ApiUrl": "https://liman.egalware.com/"
|
||||
"ServerConf": {
|
||||
"FileShareAppBackup": "\\\\stor01\\AppBackup",
|
||||
"FileShareTickets": "\\\\stor01\\TEAM DRIVES\\40_FileUpload\\unsafe_uploads"
|
||||
},
|
||||
"ApiUrl": "https://liman.egalware.com/",
|
||||
"HostOs": "Win"
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
param([string]$ProjectDir, [string]$ProjectPath);
|
||||
|
||||
$FileMajMin = "..\MajMin.vers"
|
||||
$FileVers = "Resources\VersNum.txt"
|
||||
$FileManIn = "Resources\manifest-original.xml"
|
||||
$FileManOut = "Resources\manifest.xml"
|
||||
$FileCLogIn = "Resources\ChangeLog-original.html"
|
||||
$FileCLogOut = "Resources\ChangeLog.html"
|
||||
$MajMin = Get-Content $FileMajMin # "6.14."
|
||||
$currentDate = get-date -format yyMM;
|
||||
$currentTime = get-date -format ddHH;
|
||||
$find = "<Version>(.|\n)*?</Version>";
|
||||
$currRelNum = $MajMin + $currentDate +"." + $currentTime
|
||||
$replace = "<Version>" + $MajMin + $currentDate +"." + $currentTime + "</Version>";
|
||||
$csproj = Get-Content $ProjectPath
|
||||
$csprojUpdated = $csproj -replace $find, $replace
|
||||
|
||||
Set-Content -Path $ProjectPath -Value $csprojUpdated
|
||||
Set-Content -Path $FileVers -Value $currRelNum
|
||||
|
||||
# replace x manifest
|
||||
$manData = Get-Content $FileManIn
|
||||
$manData = $manData -replace "1.0.0.0", $currRelNum
|
||||
$manData = $manData -replace "{{DIRNAME}}", "LiMan"
|
||||
$manData = $manData -replace "{{BRANCHNAME}}", "stable/LAST"
|
||||
$manData = $manData -replace "{{PACKNAME}}", "LiMan.UI"
|
||||
Set-Content -Path $FileManOut -Value $manData
|
||||
|
||||
# replace x ChangeLog
|
||||
$clogData = Get-Content $FileCLogIn
|
||||
$clogData = $clogData -replace "{{CURRENT-REL}}", $currRelNum
|
||||
Set-Content -Path $FileCLogOut -Value $clogData
|
||||
+1884
-153
File diff suppressed because it is too large
Load Diff
@@ -11,25 +11,22 @@ namespace LiMan.DB.DBModels
|
||||
[Table("Applicativi")]
|
||||
public partial class ApplicativoModel
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
//public Applicativo()
|
||||
//{
|
||||
// LicenzeAttives = new HashSet<Licenza>();
|
||||
//}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
[Key]
|
||||
[MaxLength(50)]
|
||||
public string CodApp { get; set; }
|
||||
public string CodApp { get; set; } = "";
|
||||
|
||||
[MaxLength(250)]
|
||||
public string Descrizione { get; set; }
|
||||
public string Descrizione { get; set; } = "";
|
||||
|
||||
//public virtual ICollection<Licenza> LicenzeAttives { get; set; }
|
||||
[MaxLength(2500)]
|
||||
public string TplConnString { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Tipo Applicazione
|
||||
/// </summary>
|
||||
public string Tipo { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
using Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using static Core.Enum;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.DBModels
|
||||
{
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
[Table("AuthClaims")]
|
||||
public partial class AuthClaimModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int ClaimID { get; set; }
|
||||
public int RoleID { get; set; }
|
||||
public int UserID { get; set; }
|
||||
public DateTime DtIns { get; set; } = DateTime.MinValue;
|
||||
public DateTime DtMod { get; set; } = DateTime.Now;
|
||||
|
||||
[ForeignKey("RoleID")]
|
||||
public virtual AuthRoleModel RoleNav { get; set; }
|
||||
|
||||
[ForeignKey("UserID")]
|
||||
public virtual AuthUserModel UserNav { get; set; }
|
||||
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
using Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using static Core.Enum;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.DBModels
|
||||
{
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
[Table("AuthRoles")]
|
||||
public partial class AuthRoleModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public AuthRoleModel()
|
||||
{
|
||||
Claims = new HashSet<AuthClaimModel>();
|
||||
}
|
||||
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int RoleID { get; set; }
|
||||
public string Ruolo { get; set; }
|
||||
public string Descrizione { get; set; }
|
||||
|
||||
public virtual ICollection<AuthClaimModel> Claims { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using static Core.Enum;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.DBModels
|
||||
{
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
[Table("AuthUsers")]
|
||||
public partial class AuthUserModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public AuthUserModel()
|
||||
{
|
||||
Claims = new HashSet<AuthClaimModel>();
|
||||
}
|
||||
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int UserID { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string AD_Domain { get; set; } = "";
|
||||
public string AD_User { get; set; } = "";
|
||||
|
||||
public string Cognome { get; set; } = "Cognome";
|
||||
public string Nome { get; set; } = "Nome";
|
||||
|
||||
public virtual ICollection<AuthClaimModel> Claims { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public bool IsActive
|
||||
{
|
||||
get => Claims != null && Claims.Count > 0;
|
||||
}
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
using Newtonsoft.Json;
|
||||
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;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace LiMan.DB.DBModels
|
||||
{
|
||||
[Table("EnrollRequest")]
|
||||
public partial class EnrollRequestModel
|
||||
{
|
||||
/// <summary>
|
||||
/// ID univoco
|
||||
/// </summary>
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int IdReq { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Passcode usato per autorizzare (un valore random NON DUPLICATO con quelli attivi al momento della richiesta)
|
||||
/// </summary>
|
||||
public int Passcode { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Payload richiesta, ovvero la serializzazione json di un Dict[string,string] delle info ricevute
|
||||
/// </summary>
|
||||
public string ReqPayload { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// DataOra richiesta enroll
|
||||
/// </summary>
|
||||
public DateTime DtReq { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// DataOra approvazione
|
||||
/// </summary>
|
||||
public DateTime? DtAppr { get; set; } = null;
|
||||
|
||||
/// <summary>
|
||||
/// Username approvatore
|
||||
/// </summary>
|
||||
public string UserAppr { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Licenza fornita in risposta alla richiesta
|
||||
/// </summary>
|
||||
public int IdxLic { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Indica Scaduta se non approvata e richiesta da oltre 15 minuti
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public bool IsScaduta
|
||||
{
|
||||
get => DtAppr == null && DateTime.Now.Subtract(DtReq).TotalMinutes > minScad;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// DataOra Scadenza richiesta (periodo indicato - 10 sec)
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public DateTime DtScadenza
|
||||
{
|
||||
get => DtReq.AddSeconds(minScad * 60 - 10);
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public Dictionary<string, string> DictAttrib
|
||||
{
|
||||
get
|
||||
{
|
||||
Dictionary<string, string> answ = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(ReqPayload))
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = JsonConvert.DeserializeObject<Dictionary<string, string>>(ReqPayload);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
public int DictNumKVP()
|
||||
{
|
||||
return DictAttrib.Count;
|
||||
}
|
||||
public Dictionary<string, string> DictAttribShort(int numMax)
|
||||
{
|
||||
Dictionary<string, string> answ = DictAttrib;
|
||||
if (answ.Count > numMax)
|
||||
{
|
||||
answ = answ.Take(numMax).ToDictionary(x => x.Key, x => x.Value);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Scadenza massima (in minuti) per la richiesta
|
||||
/// </summary>
|
||||
private const int minScad = 15;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
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 LiMan.DB.DBModels
|
||||
{
|
||||
[Table("InstalledReleasesHistory")]
|
||||
public partial class InstalledReleasesHistoryModel
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int IdxInstRelHist { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Data di riferimento campionamento
|
||||
/// </summary>
|
||||
public DateTime DtRif { get; set; } = DateTime.Today;
|
||||
|
||||
/// <summary>
|
||||
/// CodApp Richiesta
|
||||
/// </summary>
|
||||
[MaxLength(50)]
|
||||
public string CodApp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Versione applicativo formato semver numerico 4 blocchi
|
||||
/// </summary>
|
||||
[MaxLength(50)]
|
||||
public string VersNum { get; set; } = "0.0.0.0";
|
||||
|
||||
/// <summary>
|
||||
/// Numero Copie Installate dell'applicativo
|
||||
/// </summary>
|
||||
public int NumInst { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Numero Impieghi dell'applicativo (es per MAPO IOB-WIN il num di iOB usati con uno specifico SW)
|
||||
/// </summary>
|
||||
public int NumImp { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Numero Installazioni con score 4 (tutti valori rel correnti M.m.r.b)
|
||||
/// </summary>
|
||||
public int NumIS4 { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero Installazioni con score 3 (3 valori rel correnti M.m.r.x)
|
||||
/// </summary>
|
||||
public int NumIS3 { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero Installazioni con score 2 (2 valori rel correnti M.m.x.x)
|
||||
/// </summary>
|
||||
public int NumIS2 { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero Installazioni con score 1 (3 valori rel correnti M.x.x.x)
|
||||
/// </summary>
|
||||
public int NumIS1 { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero Installazioni con score 0 (0 valori rel correnti x.x.x.x)
|
||||
/// </summary>
|
||||
public int NumIS0 { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Versione (calcolata) a partire dal valore Num
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public Version VersVal
|
||||
{
|
||||
get
|
||||
{
|
||||
Version answ = new Version();
|
||||
try
|
||||
{
|
||||
// solo se è una versione valida: SemVer = 2/3 punti
|
||||
int numPunti = VersNum.Length - VersNum.Replace(".", "").Length;
|
||||
if (numPunti >= 2 && numPunti <= 3)
|
||||
{
|
||||
answ = !string.IsNullOrEmpty(VersNum) ? new Version(VersNum) : new Version();
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
[ForeignKey("CodApp")]
|
||||
public virtual ApplicativoModel ApplicativoNav { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
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 LiMan.DB.DBModels
|
||||
{
|
||||
[Table("InstalledReleases")]
|
||||
public partial class InstalledReleasesModel
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int IdxInstall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CodApp Richiesta
|
||||
/// </summary>
|
||||
[MaxLength(50)]
|
||||
public string CodApp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Master Key
|
||||
/// </summary>
|
||||
[MaxLength(500)]
|
||||
public string MastKey { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice Impiego Istanza (SubLic)
|
||||
/// </summary>
|
||||
[MaxLength(500)]
|
||||
public string CodImp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Chiave SubLic
|
||||
/// </summary>
|
||||
[MaxLength(500)]
|
||||
public string AppKey { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Versione applicativo formato semver numerico 4 blocchi
|
||||
/// </summary>
|
||||
[MaxLength(50)]
|
||||
public string VersNum { get; set; } = "0.0.0.0";
|
||||
|
||||
/// <summary>
|
||||
/// Numero impieghi dell'applicativo (es per MAPO IOB-WIN il num di iOB usati con uno specifico SW)
|
||||
/// </summary>
|
||||
public int NumImp { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Data di ultima verifica versione
|
||||
/// </summary>
|
||||
public DateTime DtCheck { get; set; } = DateTime.Today.AddYears(-1);
|
||||
|
||||
/// <summary>
|
||||
/// Licenza associata
|
||||
/// </summary>
|
||||
public int IdxLic { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Istanza (SubLic) associata
|
||||
/// </summary>
|
||||
public int IdxSubLic { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Versione (calcolata) a partire dal valore Num
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public Version VersVal
|
||||
{
|
||||
get
|
||||
{
|
||||
Version answ = new Version();
|
||||
try
|
||||
{
|
||||
// solo se è una versione valida: SemVer = 2/3 punti
|
||||
int numPunti = VersNum.Length - VersNum.Replace(".", "").Length;
|
||||
if (numPunti >= 2 && numPunti <= 3)
|
||||
{
|
||||
answ = !string.IsNullOrEmpty(VersNum) ? new Version(VersNum) : new Version();
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
[ForeignKey("CodApp")]
|
||||
public virtual ApplicativoModel ApplicativoNav { get; set; }
|
||||
|
||||
[ForeignKey("IdxLic")]
|
||||
public virtual LicenzaModel? LicenzaNav { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using static Core.Enum;
|
||||
|
||||
#nullable disable
|
||||
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
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;
|
||||
using static Core.Enum;
|
||||
|
||||
namespace LiMan.DB.DBModels
|
||||
{
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
//[Index(nameof(Installazione), nameof(Active), nameof(DiskStatus))]
|
||||
[Table("LogCodImp")]
|
||||
public partial class LogCodImp
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int IdxLogCodImp { get; set; }
|
||||
public int IdxLic { get; set; } = 0;
|
||||
public int IdxSubLic { get; set; } = 0;
|
||||
public string CodApp { get; set; } = "";
|
||||
public string CodImpOld { get; set; } = "";
|
||||
public string CodImpNew { get; set; } = "";
|
||||
public DateTime DtMod { get; set; } = DateTime.Now;
|
||||
|
||||
|
||||
[ForeignKey("IdxLic")]
|
||||
public virtual LicenzaModel LicenzaNav { get; set; }
|
||||
[ForeignKey("CodApp")]
|
||||
public virtual ApplicativoModel ApplicativoNav { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using static Core.Enum;
|
||||
|
||||
#nullable disable
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
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 LiMan.DB.DBModels
|
||||
{
|
||||
[Table("Releases")]
|
||||
public partial class ReleaseModel
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int IdxRel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Codice/Nome applicativo
|
||||
/// </summary>
|
||||
public string CodApp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Versione applicativo formato semver numerico 4 blocchi
|
||||
/// </summary>
|
||||
public string VersNum { get; set; } = "0.0.0.0";
|
||||
|
||||
/// <summary>
|
||||
/// Versione applicativo, formato testuale libero, può essere uguale a VersNum
|
||||
/// </summary>
|
||||
public string VersText { get; set; } = "0.1a2";
|
||||
|
||||
/// <summary>
|
||||
/// Tag associati a versione, comma separated
|
||||
/// </summary>
|
||||
public string RelTags { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Versione (calcolata) a partire dal valore Num
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public Version VersVal
|
||||
{
|
||||
get
|
||||
{
|
||||
Version answ = new Version();
|
||||
try
|
||||
{
|
||||
// solo se è una versione valida: SemVer = 2/3 punti
|
||||
int numPunti = VersNum.Length - VersNum.Replace(".", "").Length;
|
||||
if (numPunti >= 2 && numPunti <= 3)
|
||||
{
|
||||
answ = !string.IsNullOrEmpty(VersNum) ? new Version(VersNum) : new Version();
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
[NotMapped]
|
||||
public bool IsReleased
|
||||
{
|
||||
get => ReleaseDate <= DateTime.Now;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data di release
|
||||
/// </summary>
|
||||
public DateTime ReleaseDate { get; set; } = DateTime.Today.AddYears(100);
|
||||
|
||||
[ForeignKey("CodApp")]
|
||||
public virtual ApplicativoModel ApplicativoNav { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LiMan.DB.DBModels
|
||||
{
|
||||
public partial class StatsCallModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public int YearRef { get; set; } = 0;
|
||||
public string CodInst { get; set; } = "";
|
||||
public string CodApp { get; set; } = "";
|
||||
public int TotCall { get; set; } = 0;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using static Core.Enum;
|
||||
|
||||
#nullable disable
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using static Core.Enum;
|
||||
|
||||
#nullable disable
|
||||
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
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;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace LiMan.DB.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// DTO relativo alle info di ogni singolo applicativo
|
||||
/// </summary>
|
||||
public class AppRelStatusDTO
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// CodApp Richiesta
|
||||
/// </summary>
|
||||
public string CodApp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// CodInstall collegato
|
||||
/// </summary>
|
||||
public string CodInst { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// CodImpiego collegato
|
||||
/// </summary>
|
||||
public string CodImp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Licenza Updater
|
||||
/// </summary>
|
||||
public int IdxLic { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Codice cliente
|
||||
/// </summary>
|
||||
public string Cliente { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Istanza Updater (PC)
|
||||
/// </summary>
|
||||
public int IdxSubLic { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// PC/Installazione specifica
|
||||
/// </summary>
|
||||
public string PcInst { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Conteggio del numero totale degli impieghi attivi (es conteggio IOB)
|
||||
/// </summary>
|
||||
|
||||
public int NumImp { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Versione Installata
|
||||
/// </summary>
|
||||
public string VersNumInstall { get; set; } = "0.0.0.0";
|
||||
|
||||
/// <summary>
|
||||
/// Versione Release corrente
|
||||
/// </summary>
|
||||
public string VersNumCurrent { get; set; } = "0.0.0.0";
|
||||
|
||||
/// <summary>
|
||||
/// Status aggiornamento:
|
||||
/// 4 = corrente, 4 blocchi uguali (0.0.0.0)
|
||||
/// 3 = 3 uguali, cambia 4 blocco (0.0.0.x)
|
||||
/// 2 = 2 uguali, cambia 3 blocco (0.0.x.x)
|
||||
/// 1 = 1 uguali, cambia 2 blocco (0.x.x.x)
|
||||
/// 0 = 0 uguali, cambia 1 blocco (x.x.x.x)
|
||||
/// </summary>
|
||||
public int UpToDateStatus
|
||||
{
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (VersNumCurrent == VersNumInstall)
|
||||
{
|
||||
answ = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
var tokInst = VersNumInstall.Split('.');
|
||||
var tokCurr = VersNumCurrent.Split('.');
|
||||
int numTok = tokCurr.Count();
|
||||
// parto dal + basso ad assegnare punteggio...
|
||||
for (int i = 0; i < numTok; i++)
|
||||
{
|
||||
// se diversi esco...
|
||||
if (tokInst[i] != tokCurr[i])
|
||||
{
|
||||
break;
|
||||
}
|
||||
answ++;
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data Ora ultimo controllo
|
||||
/// </summary>
|
||||
public DateTime DtCheck { get; set; } = DateTime.Now;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
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;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace LiMan.DB.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// DTO relativo alle info RAGGRUPPATE x applicativo
|
||||
/// </summary>
|
||||
public class AppStatusDTO
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// CodApp Richiesta
|
||||
/// </summary>
|
||||
public string CodApp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Conteggio del numero totale installazioni
|
||||
/// </summary>
|
||||
|
||||
public int NumInst { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Conteggio del numero totale degli impieghi attivi (es conteggio IOB)
|
||||
/// </summary>
|
||||
|
||||
public int NumImp { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Versione Release corrente
|
||||
/// </summary>
|
||||
public string VersNumCurrent { get; set; } = "0.0.0.0";
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario Versioni Installate
|
||||
/// </summary>
|
||||
public Dictionary<string, int> DictVersNumInst { get; set; } = new Dictionary<string, int>();
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario Stato Update, dove la chiave è UpToDateStatus come
|
||||
/// 4 = corrente, 4 blocchi uguali (0.0.0.0)
|
||||
/// 3 = 3 uguali, cambia 4 blocco (0.0.0.x)
|
||||
/// 2 = 2 uguali, cambia 3 blocco (0.0.x.x)
|
||||
/// 1 = 1 uguali, cambia 2 blocco (0.x.x.x)
|
||||
/// 0 = 0 uguali, cambia 1 blocco (x.x.x.x)
|
||||
/// </summary>
|
||||
public Dictionary<int, int> DictUpdate { get; set; } = new Dictionary<int, int>();
|
||||
|
||||
/// <summary>
|
||||
/// Dettaglio delle versioni installate con tutte le info
|
||||
/// </summary>
|
||||
public List<AppRelStatusDTO> DetailInstalled { get; set; } = new List<AppRelStatusDTO>();
|
||||
|
||||
/// <summary>
|
||||
/// Score dello stato di aggiornamento complessivo
|
||||
/// </summary>
|
||||
public double UpdateScore
|
||||
{
|
||||
get => DictUpdate != null ? (double)(DictUpdate.Sum(x => x.Key * x.Value)) / (4 * DictUpdate.Sum(x => x.Value)) : 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data Ora ultimo controllo
|
||||
/// </summary>
|
||||
public DateTime DtCheck { get; set; } = DateTime.Now;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Core.Enum;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Core.Enum;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Core.Enum;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace LiMan.DB.DTO
|
||||
{
|
||||
public class DeviceDTO
|
||||
{
|
||||
public string CodImp { get; set; } = "";
|
||||
public string CodInst { get; set; } = "";
|
||||
public string DevName { get; set; } = "";
|
||||
public DateTime LastUpdate { get; set; } = DateTime.Today.AddYears(-1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
using LiMan.DB.DBModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
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 LiMan.DB.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Resoconto informazioni per statistiche installazioni
|
||||
/// </summary>
|
||||
public class InstallStatusDTO
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Elenco delle licenze degli applicativi abilitati alla gestione verifica update
|
||||
/// </summary>
|
||||
public List<ApplicativoDTO> UpdaterList { get; set; } = new List<ApplicativoDTO>();
|
||||
|
||||
/// <summary>
|
||||
/// Elenco chiamate con conteggio x CodApp
|
||||
/// </summary>
|
||||
public Dictionary<string, int> ReqCountApp { get; set; } = new Dictionary<string, int>();
|
||||
|
||||
/// <summary>
|
||||
/// Lista delle ultime richieste registrate (TargetUrl like '%release%') come conteggio orario (tipicamente 15 gg)
|
||||
/// </summary>
|
||||
public Dictionary<DateTime, int> ReqCountHour { get; set; } = new Dictionary<DateTime, int>();
|
||||
|
||||
/// <summary>
|
||||
/// Lista delle ultime richieste registrate (TargetUrl like '%release%') come conteggio giornaliero (tipicamente 1 anno)
|
||||
/// </summary>
|
||||
public Dictionary<DateTime, int> ReqCountDay { get; set; } = new Dictionary<DateTime, int>();
|
||||
|
||||
/// <summary>
|
||||
/// Lista delle Releases Installate x le applicazioni gestite
|
||||
/// </summary>
|
||||
public List<AppRelStatusDTO> InstallRelList { get; set; } = new List<AppRelStatusDTO>();
|
||||
|
||||
/// <summary>
|
||||
/// Statistica aggregata status applicativi
|
||||
/// </summary>
|
||||
public List<AppStatusDTO> InstallStatus { get; set; } = new List<AppStatusDTO>();
|
||||
|
||||
/// <summary>
|
||||
/// Dizionario record Impiego/dati device
|
||||
/// </summary>
|
||||
public Dictionary<string, DeviceDTO> InstDevices { get; set; } = new Dictionary<string, DeviceDTO>();
|
||||
|
||||
[NotMapped]
|
||||
public int LastCallHour
|
||||
{
|
||||
get => ReqCountHour != null && ReqCountHour.Count > 0 ? ReqCountHour.Last().Value : 0;
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public int LastCallDay
|
||||
{
|
||||
get => ReqCountDay != null && ReqCountDay.Count > 0 ? ReqCountDay.Last().Value : 0;
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public int TotalUpdaterAct
|
||||
{
|
||||
get
|
||||
{
|
||||
return UpdaterList.Sum(x => x.NumLicenzeAttive);
|
||||
}
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public double GlobalUpdateScore
|
||||
{
|
||||
get
|
||||
{
|
||||
return InstallStatus.Sum(x => x.UpdateScore * x.NumInst) / (InstallStatus.Sum(x => x.NumInst));
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Conteggio totale di tutte le applicazioni gestite, come somma CONTEGGIO degli applicativi diversi gestiti (per cliente)
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public int TotalManagedCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return UpdaterList.Count + InstallRelList.Count;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Conteggio totale di tutte le applicazioni gestite, come somma NumImpieghi di tutti gli applicativi + conteggio updater
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public int TotalManagedNum
|
||||
{
|
||||
get
|
||||
{
|
||||
return UpdaterList.Sum(x => x.NumLicenzeAttive) + InstallRelList.Sum(x => x.NumImp);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data Ora ultimo aggiornamento informazioni
|
||||
/// </summary>
|
||||
public DateTime LastUpdated { get; set; } = DateTime.Now;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Core.Enum;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace LiMan.DB.DTO
|
||||
{
|
||||
public class ReleaseDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Codice/Nome applicativo
|
||||
/// </summary>
|
||||
public string CodApp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Versione applicativo formato semver numerico 4 blocchi
|
||||
/// </summary>
|
||||
public string VersNum { get; set; } = "0.0.0.0";
|
||||
|
||||
/// <summary>
|
||||
/// Versione applicativo, formato testuale libero, può essere uguale a VersNum
|
||||
/// </summary>
|
||||
public string VersText { get; set; } = "a.b";
|
||||
|
||||
/// <summary>
|
||||
/// Oggetto versione calcolato da VersNum
|
||||
/// </summary>
|
||||
public Version VersVal { get; set; } = new Version();
|
||||
|
||||
/// <summary>
|
||||
/// Verifica se sia permessa la versione quando viene valutata la versione massima consentita
|
||||
/// </summary>
|
||||
public bool IsPermitted { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Data di release
|
||||
/// </summary>
|
||||
public DateTime ReleaseDate { get; set; } = DateTime.Today.AddYears(100);
|
||||
|
||||
/// <summary>
|
||||
/// Tag associati a versione, comma separated
|
||||
/// </summary>
|
||||
public string RelTags { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Url pagina web di changelog (traduzione gestita sul sito target) - calcolato da CodApp + vers
|
||||
/// </summary>
|
||||
//public string UrlChangelog { get; set; } = "http://releases.egalware.com";
|
||||
[NotMapped]
|
||||
public string UrlChangelog
|
||||
{
|
||||
get => $"https://releases.egalware.com/{CodApp}/{VersText}".ToLower();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Url pagina web di changelog estesa (traduzione gestita sul sito target) - calcolato da CodApp + vers
|
||||
/// </summary>
|
||||
//public string UrlChangelogExt { get; set; } = "http://releases.egalware.com";
|
||||
[NotMapped]
|
||||
public string UrlChangelogExt
|
||||
{
|
||||
get => $"https://releases.egalware.com/ext_{CodApp}/{VersText}".ToLower();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attivo/Pubblico (qui calcolato, attivo se la data di release è passata, poi potrebbe essere gestito a parte da DB)
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public bool IsActive
|
||||
{
|
||||
get => (DateTime.Today.Subtract(ReleaseDate).TotalDays >= 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using Core;
|
||||
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;
|
||||
using static Core.Enum;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace LiMan.DB.DTO
|
||||
{
|
||||
public class UpdaterDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Codice impiego (univoco x device)
|
||||
/// </summary>
|
||||
[Key]
|
||||
public string CodImp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome App updater
|
||||
/// </summary>
|
||||
public string AppName { get; set; } = "Nemo";
|
||||
|
||||
/// <summary>
|
||||
/// Versione updater
|
||||
/// </summary>
|
||||
public string AppVers { get; set; } = "0.0.0.0";
|
||||
|
||||
/// <summary>
|
||||
/// Cod installazione
|
||||
/// </summary>
|
||||
public string CodInst { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Cod Cliente
|
||||
/// </summary>
|
||||
public string Cliente { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Data ora ultima comunicaziione
|
||||
/// </summary>
|
||||
public DateTime DtLastCom { get; set; } = DateTime.Today.AddYears(-1);
|
||||
|
||||
/// <summary>
|
||||
/// Num App gestite
|
||||
/// </summary>
|
||||
public int NumApp { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Num file licenza gestite
|
||||
/// </summary>
|
||||
public int NumLicenze { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Numero Istsanze complessive (App x Istanze)
|
||||
/// </summary>
|
||||
public int NumIstanze { get; set; } = 0;
|
||||
|
||||
}
|
||||
}
|
||||
+20
-1
@@ -53,9 +53,18 @@ namespace LiMan.DB
|
||||
public virtual DbSet<InstallazioneModel> DbSetInst { get; set; }
|
||||
public virtual DbSet<LicenzaModel> DbSetLicenze { get; set; }
|
||||
public virtual DbSet<LogCallModel> DbSetLogCall { get; set; }
|
||||
public virtual DbSet<LogCodImp> DbSetLogCodImp { get; set; }
|
||||
public virtual DbSet<LogLicenzaModel> DbSetLogLicenze { get; set; }
|
||||
public virtual DbSet<SubLicenzaModel> DbSetSubLicenze { get; set; }
|
||||
public virtual DbSet<TicketModel> DbSetTicket { get; set; }
|
||||
public virtual DbSet<StatsCallModel> DbSetStatCall { get; set; }
|
||||
public virtual DbSet<AuthUserModel> DbSetUsers { get; set; }
|
||||
public virtual DbSet<AuthRoleModel> DbSetRoles { get; set; }
|
||||
public virtual DbSet<AuthClaimModel> DbSetClaims { get; set; }
|
||||
public virtual DbSet<ReleaseModel> DbSetReleases { get; set; }
|
||||
public virtual DbSet<EnrollRequestModel> DbSetEnrollReq { get; set; }
|
||||
public virtual DbSet<InstalledReleasesModel> DbSetInstallRel { get; set; }
|
||||
public virtual DbSet<InstalledReleasesHistoryModel> DbSetInstallRelHist { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
@@ -75,7 +84,9 @@ namespace LiMan.DB
|
||||
}
|
||||
else
|
||||
{
|
||||
optionsBuilder.UseSqlServer("Server=SQLSTEAM;Database=LiMan.DB;Trusted_Connection=True;");
|
||||
//optionsBuilder.UseSqlServer("Server=SQLSTEAM;Database=LiMan.DB;Trusted_Connection=True;");
|
||||
optionsBuilder.UseSqlServer("Server=W2019-SQL-STEAM;Database=LiMan.DB;Trusted_Connection=True;");
|
||||
//optionsBuilder.UseSqlServer("Server=W2019-SQL-STEAM;Database=LiMan.DB;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=LiMan.UI");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,6 +100,14 @@ namespace LiMan.DB
|
||||
entity.HasKey(e => new { e.DataRif, e.CodInst, e.CodApp, e.TargetUrl });
|
||||
});
|
||||
|
||||
|
||||
modelBuilder.Entity<StatsCallModel>(entity =>
|
||||
{
|
||||
entity.HasKey(e => new { e.YearRef, e.CodInst, e.CodApp });
|
||||
|
||||
entity.ToView("v_StatsCall");
|
||||
});
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,25 +1,38 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MailKit" Version="2.15.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.10" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.10">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.36" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="6.0.36" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.36" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.36" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.36" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.36">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.1" />
|
||||
<PackageReference Include="NLog" Version="4.7.11" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="6.0.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="6.0.28" />
|
||||
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="6.36.0" />
|
||||
<PackageReference Include="NLog" Version="5.3.2" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.36.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Core\Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="SqlScripts\Stored\stp_StatsCall_filt.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="SqlScripts\Views\v_StatsCall.sql">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,157 @@
|
||||
using NLog;
|
||||
using StackExchange.Redis;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LiMan.DB
|
||||
{
|
||||
public class MessagePipe
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public MessagePipe(IConnectionMultiplexer redisConn, string channelName, bool enableLog = false)
|
||||
{
|
||||
_channel = channelName;
|
||||
redis = redisConn;
|
||||
redisDb = redis.GetDatabase();
|
||||
this.enableLog = enableLog;
|
||||
// aggiungo sottoscrittore
|
||||
setupSubscriber();
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Events
|
||||
|
||||
public event EventHandler EA_NewMessage = delegate { };
|
||||
|
||||
#endregion Public Events
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Invio messaggio sul canale + salvataggio in cache REDIS
|
||||
/// </summary>
|
||||
/// <param name="memKey">Chiave REDIS x salvare valore</param>
|
||||
/// <param name="message">Messaggio serializzato da inviare</param>
|
||||
public bool saveAndSendMessage(string memKey, string message)
|
||||
{
|
||||
bool answ = false;
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
|
||||
// invio notifica tramite il canale richiesto
|
||||
answ = sendMessage(message);
|
||||
if (redisDb != null)
|
||||
{
|
||||
redisDb.StringSetAsync(memKey, message);
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
if (numSent.ContainsKey(memKey))
|
||||
{
|
||||
numSent[memKey]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
numSent.Add(memKey, 1);
|
||||
}
|
||||
if (enableLog || numSent[memKey] > 30)
|
||||
{
|
||||
Log.Info($"saveAndSendMessage| mKey {memKey} x {numSent[memKey]} | {message.Length} size | {ts.TotalMilliseconds} ms");
|
||||
|
||||
numSent[memKey] = 0;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invio messaggio sul canale
|
||||
/// </summary>
|
||||
/// <param name="newMess"></param>
|
||||
/// <returns></returns>
|
||||
public bool sendMessage(string newMess)
|
||||
{
|
||||
bool answ = false;
|
||||
ISubscriber sub = redis.GetSubscriber();
|
||||
sub.Publish(_channel, newMess);
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private bool enableLog = false;
|
||||
private Dictionary<string, int> numSent = new Dictionary<string, int>();
|
||||
private IConnectionMultiplexer redis;
|
||||
private IDatabase redisDb;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
/// <summary>
|
||||
/// Canale associato al gestore pipeline messaggi
|
||||
/// </summary>
|
||||
private string _channel { get; set; } = "";
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void setupSubscriber()
|
||||
{
|
||||
ISubscriber sub = redis.GetSubscriber();
|
||||
//Subscribe to the channel named messages
|
||||
sub.Subscribe(_channel, (channel, message) =>
|
||||
{
|
||||
if (enableLog)
|
||||
{
|
||||
Log.Trace($"req setup ch {channel} | {message}");
|
||||
}
|
||||
// messaggio
|
||||
PubSubEventArgs mea = new PubSubEventArgs(message);
|
||||
// se qualcuno ascolta sollevo evento nuovo valore...
|
||||
if (EA_NewMessage != null)
|
||||
{
|
||||
EA_NewMessage(this, mea);
|
||||
}
|
||||
});
|
||||
if (enableLog)
|
||||
{
|
||||
Log.Info($"Subscribed {_channel}");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
|
||||
public class PubSubEventArgs : EventArgs
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public PubSubEventArgs(string messaggio)
|
||||
{
|
||||
this.newMessage = messaggio;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string newMessage { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ namespace LiMan.DB.Migrations
|
||||
{
|
||||
IdxTicket = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
DtReq = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
DtReq = table.Column<DateTime>(type: "datetime", nullable: false, defaultValue: DateTime.Now, defaultValueSql: "GETDATE()"),
|
||||
Tipo = table.Column<int>(type: "int", nullable: false),
|
||||
IdxLic = table.Column<int>(type: "int", nullable: false),
|
||||
IdxSubLic = table.Column<int>(type: "int", nullable: false),
|
||||
|
||||
@@ -0,0 +1,401 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using LiMan.DB;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
[DbContext(typeof(LMDbContext))]
|
||||
[Migration("20240531171929_AddViewAndStored01")]
|
||||
partial class AddViewAndStored01
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.9")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
|
||||
{
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.HasKey("CodApp");
|
||||
|
||||
b.ToTable("Applicativi");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxFileAttach")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("FullStoragePath")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxTicket")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OriginalName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("StorageName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxFileAttach");
|
||||
|
||||
b.HasIndex("IdxTicket");
|
||||
|
||||
b.ToTable("FileAttach");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
|
||||
{
|
||||
b.Property<string>("CodInst")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Cliente")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Contatto")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.HasKey("CodInst");
|
||||
|
||||
b.ToTable("Installazioni");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("DataEnigma")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Enigma")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Locked")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.ToTable("Licenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
|
||||
{
|
||||
b.Property<DateTime>("DataRif")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("TargetUrl")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("NumCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
|
||||
|
||||
b.ToTable("LogCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLogLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLogLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("LogLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
|
||||
{
|
||||
b.Property<int>("YearRef")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("TotCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("YearRef", "CodInst", "CodApp");
|
||||
|
||||
b.ToView("v_StatsCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxSubLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("VetoUnlock")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("IdxSubLic");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("SubLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxTicket")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactPhone")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqBody")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SupplAnsw")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplUserCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("TType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxTicket");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("TicketLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxTicket")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("TicketNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Attivazioni")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Tickets")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Navigation("Attivazioni");
|
||||
|
||||
b.Navigation("Tickets");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
public partial class AddViewAndStored01 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
// aggiunta views
|
||||
addView(migrationBuilder, "v_StatsCall");
|
||||
// aggiunta stored
|
||||
addStored(migrationBuilder, "stp_StatsCall_filt");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
// rimozione stored
|
||||
remStored(migrationBuilder, "stp_StatsCall_filt");
|
||||
// rimozione views
|
||||
remView(migrationBuilder, "v_StatsCall");
|
||||
}
|
||||
|
||||
private void addView(MigrationBuilder migrationBuilder, string viewName)
|
||||
{
|
||||
string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "SqlScripts", "Views", $"{viewName}.sql");
|
||||
string viewBody = File.ReadAllText(path);
|
||||
migrationBuilder.Sql(viewBody);
|
||||
}
|
||||
private void addStored(MigrationBuilder migrationBuilder, string objName)
|
||||
{
|
||||
string path = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "SqlScripts", "Stored", $"{objName}.sql");
|
||||
string viewBody = File.ReadAllText(path);
|
||||
migrationBuilder.Sql(viewBody);
|
||||
}
|
||||
|
||||
private void remView(MigrationBuilder migrationBuilder, string viewName)
|
||||
{
|
||||
migrationBuilder.Sql($"EXEC('DROP VIEW IF EXISTS dbo.{viewName}');");
|
||||
}
|
||||
|
||||
private void remStored(MigrationBuilder migrationBuilder, string objName)
|
||||
{
|
||||
migrationBuilder.Sql($"EXEC('DROP PROCEDURE IF EXISTS dbo.{objName}');");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,500 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using LiMan.DB;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
[DbContext(typeof(LMDbContext))]
|
||||
[Migration("20240713132356_AddUserRoleClaim01")]
|
||||
partial class AddUserRoleClaim01
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.28")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
|
||||
{
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.HasKey("CodApp");
|
||||
|
||||
b.ToTable("Applicativi");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.Property<int>("ClaimID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("RoleID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ClaimID");
|
||||
|
||||
b.HasIndex("RoleID");
|
||||
|
||||
b.HasIndex("UserID");
|
||||
|
||||
b.ToTable("AuthClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Property<int>("RoleID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Ruolo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("RoleID");
|
||||
|
||||
b.ToTable("AuthRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Property<int>("UserID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
|
||||
|
||||
b.Property<string>("AD_Domain")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AD_User")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserID");
|
||||
|
||||
b.ToTable("AuthUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxFileAttach")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("FullStoragePath")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxTicket")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OriginalName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("StorageName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxFileAttach");
|
||||
|
||||
b.HasIndex("IdxTicket");
|
||||
|
||||
b.ToTable("FileAttach");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
|
||||
{
|
||||
b.Property<string>("CodInst")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Cliente")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Contatto")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.HasKey("CodInst");
|
||||
|
||||
b.ToTable("Installazioni");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("DataEnigma")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Enigma")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Locked")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.ToTable("Licenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
|
||||
{
|
||||
b.Property<DateTime>("DataRif")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("TargetUrl")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("NumCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
|
||||
|
||||
b.ToTable("LogCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLogLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLogLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("LogLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
|
||||
{
|
||||
b.Property<int>("YearRef")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("TotCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("YearRef", "CodInst", "CodApp");
|
||||
|
||||
b.ToView("v_StatsCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxSubLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("VetoUnlock")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("IdxSubLic");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("SubLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxTicket")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactPhone")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqBody")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SupplAnsw")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplUserCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("TType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxTicket");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("TicketLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("RoleID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("UserID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RoleNav");
|
||||
|
||||
b.Navigation("UserNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxTicket")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("TicketNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Attivazioni")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Tickets")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Navigation("Attivazioni");
|
||||
|
||||
b.Navigation("Tickets");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
public partial class AddUserRoleClaim01 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AuthRoles",
|
||||
columns: table => new
|
||||
{
|
||||
RoleID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Ruolo = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Descrizione = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AuthRoles", x => x.RoleID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AuthUsers",
|
||||
columns: table => new
|
||||
{
|
||||
UserID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Username = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AD_Domain = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
AD_User = table.Column<string>(type: "nvarchar(max)", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AuthUsers", x => x.UserID);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "AuthClaims",
|
||||
columns: table => new
|
||||
{
|
||||
ClaimID = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
RoleID = table.Column<int>(type: "int", nullable: false),
|
||||
UserID = table.Column<int>(type: "int", nullable: false),
|
||||
DtIns = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
DtMod = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_AuthClaims", x => x.ClaimID);
|
||||
table.ForeignKey(
|
||||
name: "FK_AuthClaims_AuthRoles_RoleID",
|
||||
column: x => x.RoleID,
|
||||
principalTable: "AuthRoles",
|
||||
principalColumn: "RoleID",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_AuthClaims_AuthUsers_UserID",
|
||||
column: x => x.UserID,
|
||||
principalTable: "AuthUsers",
|
||||
principalColumn: "UserID",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AuthClaims_RoleID",
|
||||
table: "AuthClaims",
|
||||
column: "RoleID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_AuthClaims_UserID",
|
||||
table: "AuthClaims",
|
||||
column: "UserID");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "AuthClaims");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AuthRoles");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "AuthUsers");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,506 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using LiMan.DB;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
[DbContext(typeof(LMDbContext))]
|
||||
[Migration("20240715060405_AddUserRoleClaim02")]
|
||||
partial class AddUserRoleClaim02
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.28")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
|
||||
{
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.HasKey("CodApp");
|
||||
|
||||
b.ToTable("Applicativi");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.Property<int>("ClaimID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("RoleID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ClaimID");
|
||||
|
||||
b.HasIndex("RoleID");
|
||||
|
||||
b.HasIndex("UserID");
|
||||
|
||||
b.ToTable("AuthClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Property<int>("RoleID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Ruolo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("RoleID");
|
||||
|
||||
b.ToTable("AuthRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Property<int>("UserID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
|
||||
|
||||
b.Property<string>("AD_Domain")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AD_User")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Cognome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Nome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserID");
|
||||
|
||||
b.ToTable("AuthUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxFileAttach")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("FullStoragePath")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxTicket")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OriginalName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("StorageName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxFileAttach");
|
||||
|
||||
b.HasIndex("IdxTicket");
|
||||
|
||||
b.ToTable("FileAttach");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
|
||||
{
|
||||
b.Property<string>("CodInst")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Cliente")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Contatto")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.HasKey("CodInst");
|
||||
|
||||
b.ToTable("Installazioni");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("DataEnigma")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Enigma")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Locked")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.ToTable("Licenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
|
||||
{
|
||||
b.Property<DateTime>("DataRif")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("TargetUrl")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("NumCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
|
||||
|
||||
b.ToTable("LogCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLogLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLogLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("LogLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
|
||||
{
|
||||
b.Property<int>("YearRef")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("TotCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("YearRef", "CodInst", "CodApp");
|
||||
|
||||
b.ToView("v_StatsCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxSubLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("VetoUnlock")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("IdxSubLic");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("SubLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxTicket")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactPhone")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqBody")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SupplAnsw")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplUserCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("TType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxTicket");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("TicketLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("RoleID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("UserID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RoleNav");
|
||||
|
||||
b.Navigation("UserNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxTicket")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("TicketNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Attivazioni")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Tickets")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Navigation("Attivazioni");
|
||||
|
||||
b.Navigation("Tickets");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
public partial class AddUserRoleClaim02 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Cognome",
|
||||
table: "AuthUsers",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Nome",
|
||||
table: "AuthUsers",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Cognome",
|
||||
table: "AuthUsers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Nome",
|
||||
table: "AuthUsers");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,510 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using LiMan.DB;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
[DbContext(typeof(LMDbContext))]
|
||||
[Migration("20240718060756_AddTplConnString01")]
|
||||
partial class AddTplConnString01
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.28")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
|
||||
{
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("TplConnString")
|
||||
.HasMaxLength(2500)
|
||||
.HasColumnType("nvarchar(2500)");
|
||||
|
||||
b.HasKey("CodApp");
|
||||
|
||||
b.ToTable("Applicativi");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.Property<int>("ClaimID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("RoleID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ClaimID");
|
||||
|
||||
b.HasIndex("RoleID");
|
||||
|
||||
b.HasIndex("UserID");
|
||||
|
||||
b.ToTable("AuthClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Property<int>("RoleID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Ruolo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("RoleID");
|
||||
|
||||
b.ToTable("AuthRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Property<int>("UserID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
|
||||
|
||||
b.Property<string>("AD_Domain")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AD_User")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Cognome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Nome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserID");
|
||||
|
||||
b.ToTable("AuthUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxFileAttach")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("FullStoragePath")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxTicket")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OriginalName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("StorageName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxFileAttach");
|
||||
|
||||
b.HasIndex("IdxTicket");
|
||||
|
||||
b.ToTable("FileAttach");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
|
||||
{
|
||||
b.Property<string>("CodInst")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Cliente")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Contatto")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.HasKey("CodInst");
|
||||
|
||||
b.ToTable("Installazioni");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("DataEnigma")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Enigma")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Locked")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.ToTable("Licenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
|
||||
{
|
||||
b.Property<DateTime>("DataRif")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("TargetUrl")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("NumCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
|
||||
|
||||
b.ToTable("LogCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLogLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLogLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("LogLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
|
||||
{
|
||||
b.Property<int>("YearRef")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("TotCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("YearRef", "CodInst", "CodApp");
|
||||
|
||||
b.ToView("v_StatsCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxSubLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("VetoUnlock")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("IdxSubLic");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("SubLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxTicket")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactPhone")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqBody")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SupplAnsw")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplUserCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("TType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxTicket");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("TicketLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("RoleID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("UserID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RoleNav");
|
||||
|
||||
b.Navigation("UserNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxTicket")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("TicketNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Attivazioni")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Tickets")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Navigation("Attivazioni");
|
||||
|
||||
b.Navigation("Tickets");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
public partial class AddTplConnString01 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "TplConnString",
|
||||
table: "Applicativi",
|
||||
type: "nvarchar(2500)",
|
||||
maxLength: 2500,
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TplConnString",
|
||||
table: "Applicativi");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,546 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using LiMan.DB;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
[DbContext(typeof(LMDbContext))]
|
||||
[Migration("20240806142953_AddRelModel01")]
|
||||
partial class AddRelModel01
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.28")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
|
||||
{
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("TplConnString")
|
||||
.HasMaxLength(2500)
|
||||
.HasColumnType("nvarchar(2500)");
|
||||
|
||||
b.HasKey("CodApp");
|
||||
|
||||
b.ToTable("Applicativi");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.Property<int>("ClaimID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("RoleID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ClaimID");
|
||||
|
||||
b.HasIndex("RoleID");
|
||||
|
||||
b.HasIndex("UserID");
|
||||
|
||||
b.ToTable("AuthClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Property<int>("RoleID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Ruolo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("RoleID");
|
||||
|
||||
b.ToTable("AuthRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Property<int>("UserID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
|
||||
|
||||
b.Property<string>("AD_Domain")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AD_User")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Cognome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Nome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserID");
|
||||
|
||||
b.ToTable("AuthUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxFileAttach")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("FullStoragePath")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxTicket")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OriginalName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("StorageName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxFileAttach");
|
||||
|
||||
b.HasIndex("IdxTicket");
|
||||
|
||||
b.ToTable("FileAttach");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
|
||||
{
|
||||
b.Property<string>("CodInst")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Cliente")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Contatto")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.HasKey("CodInst");
|
||||
|
||||
b.ToTable("Installazioni");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("DataEnigma")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Enigma")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Locked")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.ToTable("Licenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
|
||||
{
|
||||
b.Property<DateTime>("DataRif")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("TargetUrl")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("NumCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
|
||||
|
||||
b.ToTable("LogCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLogLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLogLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("LogLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxRel")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxRel"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("ReleaseDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("VersNum")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("VersText")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxRel");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.ToTable("Releases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
|
||||
{
|
||||
b.Property<int>("YearRef")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("TotCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("YearRef", "CodInst", "CodApp");
|
||||
|
||||
b.ToView("v_StatsCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxSubLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("VetoUnlock")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("IdxSubLic");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("SubLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxTicket")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactPhone")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqBody")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SupplAnsw")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplUserCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("TType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxTicket");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("TicketLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("RoleID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("UserID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RoleNav");
|
||||
|
||||
b.Navigation("UserNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxTicket")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("TicketNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Attivazioni")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Tickets")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Navigation("Attivazioni");
|
||||
|
||||
b.Navigation("Tickets");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
public partial class AddRelModel01 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Releases",
|
||||
columns: table => new
|
||||
{
|
||||
IdxRel = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
CodApp = table.Column<string>(type: "nvarchar(50)", nullable: true),
|
||||
VersNum = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
VersText = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ReleaseDate = table.Column<DateTime>(type: "datetime", nullable: false, defaultValue: DateTime.Now, defaultValueSql: "GETDATE()")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Releases", x => x.IdxRel);
|
||||
table.ForeignKey(
|
||||
name: "FK_Releases_Applicativi_CodApp",
|
||||
column: x => x.CodApp,
|
||||
principalTable: "Applicativi",
|
||||
principalColumn: "CodApp");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Releases_CodApp",
|
||||
table: "Releases",
|
||||
column: "CodApp");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Releases");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,552 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using LiMan.DB;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
[DbContext(typeof(LMDbContext))]
|
||||
[Migration("20240917090404_UpdRelModelAndApp01")]
|
||||
partial class UpdRelModelAndApp01
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.28")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
|
||||
{
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Tipo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TplConnString")
|
||||
.HasMaxLength(2500)
|
||||
.HasColumnType("nvarchar(2500)");
|
||||
|
||||
b.HasKey("CodApp");
|
||||
|
||||
b.ToTable("Applicativi");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.Property<int>("ClaimID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("RoleID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ClaimID");
|
||||
|
||||
b.HasIndex("RoleID");
|
||||
|
||||
b.HasIndex("UserID");
|
||||
|
||||
b.ToTable("AuthClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Property<int>("RoleID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Ruolo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("RoleID");
|
||||
|
||||
b.ToTable("AuthRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Property<int>("UserID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
|
||||
|
||||
b.Property<string>("AD_Domain")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AD_User")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Cognome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Nome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserID");
|
||||
|
||||
b.ToTable("AuthUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxFileAttach")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("FullStoragePath")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxTicket")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OriginalName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("StorageName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxFileAttach");
|
||||
|
||||
b.HasIndex("IdxTicket");
|
||||
|
||||
b.ToTable("FileAttach");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
|
||||
{
|
||||
b.Property<string>("CodInst")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Cliente")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Contatto")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.HasKey("CodInst");
|
||||
|
||||
b.ToTable("Installazioni");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("DataEnigma")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Enigma")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Locked")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.ToTable("Licenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
|
||||
{
|
||||
b.Property<DateTime>("DataRif")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("TargetUrl")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("NumCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
|
||||
|
||||
b.ToTable("LogCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLogLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLogLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("LogLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxRel")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxRel"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("RelTags")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ReleaseDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("VersNum")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("VersText")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxRel");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.ToTable("Releases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
|
||||
{
|
||||
b.Property<int>("YearRef")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("TotCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("YearRef", "CodInst", "CodApp");
|
||||
|
||||
b.ToView("v_StatsCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxSubLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("VetoUnlock")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("IdxSubLic");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("SubLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxTicket")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactPhone")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqBody")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SupplAnsw")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplUserCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("TType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxTicket");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("TicketLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("RoleID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("UserID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RoleNav");
|
||||
|
||||
b.Navigation("UserNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxTicket")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("TicketNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Attivazioni")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Tickets")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Navigation("Attivazioni");
|
||||
|
||||
b.Navigation("Tickets");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
public partial class UpdRelModelAndApp01 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "RelTags",
|
||||
table: "Releases",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "Tipo",
|
||||
table: "Applicativi",
|
||||
type: "nvarchar(max)",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "RelTags",
|
||||
table: "Releases");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Tipo",
|
||||
table: "Applicativi");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,583 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using LiMan.DB;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
[DbContext(typeof(LMDbContext))]
|
||||
[Migration("20241231105435_AddEnrollRequest")]
|
||||
partial class AddEnrollRequest
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.28")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
|
||||
{
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Tipo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TplConnString")
|
||||
.HasMaxLength(2500)
|
||||
.HasColumnType("nvarchar(2500)");
|
||||
|
||||
b.HasKey("CodApp");
|
||||
|
||||
b.ToTable("Applicativi");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.Property<int>("ClaimID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("RoleID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ClaimID");
|
||||
|
||||
b.HasIndex("RoleID");
|
||||
|
||||
b.HasIndex("UserID");
|
||||
|
||||
b.ToTable("AuthClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Property<int>("RoleID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Ruolo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("RoleID");
|
||||
|
||||
b.ToTable("AuthRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Property<int>("UserID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
|
||||
|
||||
b.Property<string>("AD_Domain")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AD_User")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Cognome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Nome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserID");
|
||||
|
||||
b.ToTable("AuthUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.EnrollRequestModel", b =>
|
||||
{
|
||||
b.Property<int>("IdReq")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdReq"), 1L, 1);
|
||||
|
||||
b.Property<DateTime?>("DtAppr")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Passcode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqPayload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserAppr")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdReq");
|
||||
|
||||
b.ToTable("EnrollRequest");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxFileAttach")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("FullStoragePath")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxTicket")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OriginalName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("StorageName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxFileAttach");
|
||||
|
||||
b.HasIndex("IdxTicket");
|
||||
|
||||
b.ToTable("FileAttach");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
|
||||
{
|
||||
b.Property<string>("CodInst")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Cliente")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Contatto")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.HasKey("CodInst");
|
||||
|
||||
b.ToTable("Installazioni");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("DataEnigma")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Enigma")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Locked")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.ToTable("Licenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
|
||||
{
|
||||
b.Property<DateTime>("DataRif")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("TargetUrl")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("NumCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
|
||||
|
||||
b.ToTable("LogCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLogLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLogLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("LogLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxRel")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxRel"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("RelTags")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ReleaseDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("VersNum")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("VersText")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxRel");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.ToTable("Releases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
|
||||
{
|
||||
b.Property<int>("YearRef")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("TotCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("YearRef", "CodInst", "CodApp");
|
||||
|
||||
b.ToView("v_StatsCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxSubLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("VetoUnlock")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("IdxSubLic");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("SubLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxTicket")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactPhone")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqBody")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SupplAnsw")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplUserCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("TType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxTicket");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("TicketLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("RoleID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("UserID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RoleNav");
|
||||
|
||||
b.Navigation("UserNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxTicket")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("TicketNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Attivazioni")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Tickets")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Navigation("Attivazioni");
|
||||
|
||||
b.Navigation("Tickets");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
public partial class AddEnrollRequest : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "EnrollRequest",
|
||||
columns: table => new
|
||||
{
|
||||
IdReq = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
Passcode = table.Column<int>(type: "int", nullable: false),
|
||||
ReqPayload = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DtReq = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
DtAppr = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
UserAppr = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
IdxLic = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_EnrollRequest", x => x.IdReq);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "EnrollRequest");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,639 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using LiMan.DB;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
[DbContext(typeof(LMDbContext))]
|
||||
[Migration("20250111112800_AddInstalledRelTrack")]
|
||||
partial class AddInstalledRelTrack
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.28")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
|
||||
{
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Tipo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TplConnString")
|
||||
.HasMaxLength(2500)
|
||||
.HasColumnType("nvarchar(2500)");
|
||||
|
||||
b.HasKey("CodApp");
|
||||
|
||||
b.ToTable("Applicativi");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.Property<int>("ClaimID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("RoleID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ClaimID");
|
||||
|
||||
b.HasIndex("RoleID");
|
||||
|
||||
b.HasIndex("UserID");
|
||||
|
||||
b.ToTable("AuthClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Property<int>("RoleID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Ruolo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("RoleID");
|
||||
|
||||
b.ToTable("AuthRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Property<int>("UserID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
|
||||
|
||||
b.Property<string>("AD_Domain")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AD_User")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Cognome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Nome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserID");
|
||||
|
||||
b.ToTable("AuthUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.EnrollRequestModel", b =>
|
||||
{
|
||||
b.Property<int>("IdReq")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdReq"), 1L, 1);
|
||||
|
||||
b.Property<DateTime?>("DtAppr")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Passcode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqPayload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserAppr")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdReq");
|
||||
|
||||
b.ToTable("EnrollRequest");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxFileAttach")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("FullStoragePath")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxTicket")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OriginalName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("StorageName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxFileAttach");
|
||||
|
||||
b.HasIndex("IdxTicket");
|
||||
|
||||
b.ToTable("FileAttach");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
|
||||
{
|
||||
b.Property<string>("CodInst")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Cliente")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Contatto")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.HasKey("CodInst");
|
||||
|
||||
b.ToTable("Installazioni");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxInstall")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxInstall"), 1L, 1);
|
||||
|
||||
b.Property<string>("AppKey")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodImp")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<DateTime>("DtCheck")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("MastKey")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<int>("NumImp")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("VersNum")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("IdxInstall");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.ToTable("InstalledReleases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("DataEnigma")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Enigma")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Locked")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.ToTable("Licenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
|
||||
{
|
||||
b.Property<DateTime>("DataRif")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("TargetUrl")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("NumCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
|
||||
|
||||
b.ToTable("LogCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLogLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLogLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("LogLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxRel")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxRel"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("RelTags")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ReleaseDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("VersNum")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("VersText")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxRel");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.ToTable("Releases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
|
||||
{
|
||||
b.Property<int>("YearRef")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("TotCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("YearRef", "CodInst", "CodApp");
|
||||
|
||||
b.ToView("v_StatsCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxSubLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("VetoUnlock")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("IdxSubLic");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("SubLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxTicket")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactPhone")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqBody")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SupplAnsw")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplUserCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("TType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxTicket");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("TicketLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("RoleID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("UserID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RoleNav");
|
||||
|
||||
b.Navigation("UserNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxTicket")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("TicketNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Attivazioni")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Tickets")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Navigation("Attivazioni");
|
||||
|
||||
b.Navigation("Tickets");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
public partial class AddInstalledRelTrack : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "InstalledReleases",
|
||||
columns: table => new
|
||||
{
|
||||
IdxInstall = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
CodApp = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||
MastKey = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
CodImp = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
AppKey = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
VersNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||
NumImp = table.Column<int>(type: "int", nullable: false),
|
||||
DtCheck = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
IdxLic = table.Column<int>(type: "int", nullable: false),
|
||||
IdxSubLic = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_InstalledReleases", x => x.IdxInstall);
|
||||
table.ForeignKey(
|
||||
name: "FK_InstalledReleases_Applicativi_CodApp",
|
||||
column: x => x.CodApp,
|
||||
principalTable: "Applicativi",
|
||||
principalColumn: "CodApp");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InstalledReleases_CodApp",
|
||||
table: "InstalledReleases",
|
||||
column: "CodApp");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "InstalledReleases");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,705 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using LiMan.DB;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
[DbContext(typeof(LMDbContext))]
|
||||
[Migration("20250115112104_AddInstRelHistTrack")]
|
||||
partial class AddInstRelHistTrack
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.28")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
|
||||
{
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Tipo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TplConnString")
|
||||
.HasMaxLength(2500)
|
||||
.HasColumnType("nvarchar(2500)");
|
||||
|
||||
b.HasKey("CodApp");
|
||||
|
||||
b.ToTable("Applicativi");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.Property<int>("ClaimID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("RoleID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ClaimID");
|
||||
|
||||
b.HasIndex("RoleID");
|
||||
|
||||
b.HasIndex("UserID");
|
||||
|
||||
b.ToTable("AuthClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Property<int>("RoleID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Ruolo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("RoleID");
|
||||
|
||||
b.ToTable("AuthRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Property<int>("UserID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
|
||||
|
||||
b.Property<string>("AD_Domain")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AD_User")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Cognome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Nome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserID");
|
||||
|
||||
b.ToTable("AuthUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.EnrollRequestModel", b =>
|
||||
{
|
||||
b.Property<int>("IdReq")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdReq"), 1L, 1);
|
||||
|
||||
b.Property<DateTime?>("DtAppr")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Passcode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqPayload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserAppr")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdReq");
|
||||
|
||||
b.ToTable("EnrollRequest");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxFileAttach")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("FullStoragePath")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxTicket")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OriginalName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("StorageName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxFileAttach");
|
||||
|
||||
b.HasIndex("IdxTicket");
|
||||
|
||||
b.ToTable("FileAttach");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
|
||||
{
|
||||
b.Property<string>("CodInst")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Cliente")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Contatto")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.HasKey("CodInst");
|
||||
|
||||
b.ToTable("Installazioni");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesHistoryModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxInstRelHist")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxInstRelHist"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("DtRif")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("NumIS0")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumIS1")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumIS2")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumIS3")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumIS4")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumImp")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumInst")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("VersNum")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("IdxInstRelHist");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.ToTable("InstalledReleasesHistory");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxInstall")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxInstall"), 1L, 1);
|
||||
|
||||
b.Property<string>("AppKey")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodImp")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<DateTime>("DtCheck")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("MastKey")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<int>("NumImp")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("VersNum")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("IdxInstall");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("InstalledReleases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("DataEnigma")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Enigma")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Locked")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.ToTable("Licenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
|
||||
{
|
||||
b.Property<DateTime>("DataRif")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("TargetUrl")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("NumCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
|
||||
|
||||
b.ToTable("LogCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLogLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLogLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("LogLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxRel")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxRel"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("RelTags")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ReleaseDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("VersNum")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("VersText")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxRel");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.ToTable("Releases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
|
||||
{
|
||||
b.Property<int>("YearRef")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("TotCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("YearRef", "CodInst", "CodApp");
|
||||
|
||||
b.ToView("v_StatsCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxSubLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("VetoUnlock")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("IdxSubLic");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("SubLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxTicket")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactPhone")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqBody")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SupplAnsw")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplUserCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("TType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxTicket");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("TicketLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("RoleID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("UserID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RoleNav");
|
||||
|
||||
b.Navigation("UserNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxTicket")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("TicketNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesHistoryModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Attivazioni")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Tickets")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Navigation("Attivazioni");
|
||||
|
||||
b.Navigation("Tickets");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
public partial class AddInstRelHistTrack : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "InstalledReleasesHistory",
|
||||
columns: table => new
|
||||
{
|
||||
IdxInstRelHist = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
DtRif = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CodApp = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||
VersNum = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
||||
NumInst = table.Column<int>(type: "int", nullable: false),
|
||||
NumImp = table.Column<int>(type: "int", nullable: false),
|
||||
NumIS4 = table.Column<int>(type: "int", nullable: false),
|
||||
NumIS3 = table.Column<int>(type: "int", nullable: false),
|
||||
NumIS2 = table.Column<int>(type: "int", nullable: false),
|
||||
NumIS1 = table.Column<int>(type: "int", nullable: false),
|
||||
NumIS0 = table.Column<int>(type: "int", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_InstalledReleasesHistory", x => x.IdxInstRelHist);
|
||||
table.ForeignKey(
|
||||
name: "FK_InstalledReleasesHistory_Applicativi_CodApp",
|
||||
column: x => x.CodApp,
|
||||
principalTable: "Applicativi",
|
||||
principalColumn: "CodApp");
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InstalledReleases_IdxLic",
|
||||
table: "InstalledReleases",
|
||||
column: "IdxLic");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_InstalledReleasesHistory_CodApp",
|
||||
table: "InstalledReleasesHistory",
|
||||
column: "CodApp");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InstalledReleases_Licenze_IdxLic",
|
||||
table: "InstalledReleases",
|
||||
column: "IdxLic",
|
||||
principalTable: "Licenze",
|
||||
principalColumn: "IdxLic",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InstalledReleases_Licenze_IdxLic",
|
||||
table: "InstalledReleases");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "InstalledReleasesHistory");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_InstalledReleases_IdxLic",
|
||||
table: "InstalledReleases");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,757 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using LiMan.DB;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
[DbContext(typeof(LMDbContext))]
|
||||
[Migration("20251203155123_AddLogCodImp")]
|
||||
partial class AddLogCodImp
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.36")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
|
||||
{
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Tipo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TplConnString")
|
||||
.HasMaxLength(2500)
|
||||
.HasColumnType("nvarchar(2500)");
|
||||
|
||||
b.HasKey("CodApp");
|
||||
|
||||
b.ToTable("Applicativi");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.Property<int>("ClaimID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("RoleID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ClaimID");
|
||||
|
||||
b.HasIndex("RoleID");
|
||||
|
||||
b.HasIndex("UserID");
|
||||
|
||||
b.ToTable("AuthClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Property<int>("RoleID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Ruolo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("RoleID");
|
||||
|
||||
b.ToTable("AuthRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Property<int>("UserID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
|
||||
|
||||
b.Property<string>("AD_Domain")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AD_User")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Cognome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Nome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserID");
|
||||
|
||||
b.ToTable("AuthUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.EnrollRequestModel", b =>
|
||||
{
|
||||
b.Property<int>("IdReq")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdReq"), 1L, 1);
|
||||
|
||||
b.Property<DateTime?>("DtAppr")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Passcode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqPayload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserAppr")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdReq");
|
||||
|
||||
b.ToTable("EnrollRequest");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxFileAttach")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("FullStoragePath")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxTicket")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OriginalName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("StorageName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxFileAttach");
|
||||
|
||||
b.HasIndex("IdxTicket");
|
||||
|
||||
b.ToTable("FileAttach");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstallazioneModel", b =>
|
||||
{
|
||||
b.Property<string>("CodInst")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Cliente")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Contatto")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.HasKey("CodInst");
|
||||
|
||||
b.ToTable("Installazioni");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesHistoryModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxInstRelHist")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxInstRelHist"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("DtRif")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("NumIS0")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumIS1")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumIS2")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumIS3")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumIS4")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumImp")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumInst")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("VersNum")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("IdxInstRelHist");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.ToTable("InstalledReleasesHistory");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxInstall")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxInstall"), 1L, 1);
|
||||
|
||||
b.Property<string>("AppKey")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodImp")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<DateTime>("DtCheck")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("MastKey")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<int>("NumImp")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("VersNum")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("IdxInstall");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("InstalledReleases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("DataEnigma")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Enigma")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Locked")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Payload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.ToTable("Licenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogCallModel", b =>
|
||||
{
|
||||
b.Property<DateTime>("DataRif")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("TargetUrl")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("NumCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("DataRif", "CodInst", "CodApp", "TargetUrl");
|
||||
|
||||
b.ToTable("LogCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogCodImp", b =>
|
||||
{
|
||||
b.Property<int>("IdxLogCodImp")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogCodImp"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodImpNew")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodImpOld")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DtMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLogCodImp");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("LogCodImp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLogLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumLicenze")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("Scadenza")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLogLic");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("CodInst");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("LogLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxRel")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxRel"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("RelTags")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ReleaseDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("VersNum")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("VersText")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxRel");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.ToTable("Releases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
|
||||
{
|
||||
b.Property<int>("YearRef")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("TotCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("YearRef", "CodInst", "CodApp");
|
||||
|
||||
b.ToView("v_StatsCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxSubLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("VetoUnlock")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("IdxSubLic");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("SubLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxTicket")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ContactPhone")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqBody")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("SupplAnsw")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplEmail")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("SupplUserCode")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("TType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Tipo")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxTicket");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("TicketLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("RoleID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("UserID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RoleNav");
|
||||
|
||||
b.Navigation("UserNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxTicket")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("TicketNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesHistoryModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogCodImp", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.InstallazioneModel", "InstallazioneNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodInst");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("InstallazioneNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Attivazioni")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.TicketModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany("Tickets")
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Navigation("Attivazioni");
|
||||
|
||||
b.Navigation("Tickets");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
public partial class AddLogCodImp : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "LogCodImp",
|
||||
columns: table => new
|
||||
{
|
||||
IdxLogCodImp = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
IdxLic = table.Column<int>(type: "int", nullable: false),
|
||||
IdxSubLic = table.Column<int>(type: "int", nullable: false),
|
||||
CodApp = table.Column<string>(type: "nvarchar(50)", nullable: true),
|
||||
CodImpOld = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
CodImpNew = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
DtMod = table.Column<DateTime>(type: "datetime2", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_LogCodImp", x => x.IdxLogCodImp);
|
||||
table.ForeignKey(
|
||||
name: "FK_LogCodImp_Applicativi_CodApp",
|
||||
column: x => x.CodApp,
|
||||
principalTable: "Applicativi",
|
||||
principalColumn: "CodApp");
|
||||
table.ForeignKey(
|
||||
name: "FK_LogCodImp_Licenze_IdxLic",
|
||||
column: x => x.IdxLic,
|
||||
principalTable: "Licenze",
|
||||
principalColumn: "IdxLic",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_LogCodImp_CodApp",
|
||||
table: "LogCodImp",
|
||||
column: "CodApp");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_LogCodImp_IdxLic",
|
||||
table: "LogCodImp",
|
||||
column: "IdxLic");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "LogCodImp");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,8 @@ using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace LiMan.DB.Migrations
|
||||
{
|
||||
[DbContext(typeof(LMDbContext))]
|
||||
@@ -15,10 +17,11 @@ namespace LiMan.DB.Migrations
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("Relational:Collation", "SQL_Latin1_General_CP1_CI_AS")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128)
|
||||
.HasAnnotation("ProductVersion", "5.0.10")
|
||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||
.UseCollation("SQL_Latin1_General_CP1_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.36")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ApplicativoModel", b =>
|
||||
{
|
||||
@@ -30,17 +33,132 @@ namespace LiMan.DB.Migrations
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("Tipo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TplConnString")
|
||||
.HasMaxLength(2500)
|
||||
.HasColumnType("nvarchar(2500)");
|
||||
|
||||
b.HasKey("CodApp");
|
||||
|
||||
b.ToTable("Applicativi");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.Property<int>("ClaimID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ClaimID"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("RoleID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("UserID")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ClaimID");
|
||||
|
||||
b.HasIndex("RoleID");
|
||||
|
||||
b.HasIndex("UserID");
|
||||
|
||||
b.ToTable("AuthClaims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Property<int>("RoleID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("RoleID"), 1L, 1);
|
||||
|
||||
b.Property<string>("Descrizione")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Ruolo")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("RoleID");
|
||||
|
||||
b.ToTable("AuthRoles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Property<int>("UserID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("UserID"), 1L, 1);
|
||||
|
||||
b.Property<string>("AD_Domain")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("AD_User")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Cognome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Nome")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Username")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserID");
|
||||
|
||||
b.ToTable("AuthUsers");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.EnrollRequestModel", b =>
|
||||
{
|
||||
b.Property<int>("IdReq")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdReq"), 1L, 1);
|
||||
|
||||
b.Property<DateTime?>("DtAppr")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DtReq")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Passcode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ReqPayload")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserAppr")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdReq");
|
||||
|
||||
b.ToTable("EnrollRequest");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxFileAttach")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxFileAttach"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DtEvent")
|
||||
.HasColumnType("datetime2");
|
||||
@@ -91,12 +209,109 @@ namespace LiMan.DB.Migrations
|
||||
b.ToTable("Installazioni");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesHistoryModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxInstRelHist")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxInstRelHist"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<DateTime>("DtRif")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("NumIS0")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumIS1")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumIS2")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumIS3")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumIS4")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumImp")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumInst")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("VersNum")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("IdxInstRelHist");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.ToTable("InstalledReleasesHistory");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxInstall")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxInstall"), 1L, 1);
|
||||
|
||||
b.Property<string>("AppKey")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodImp")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<DateTime>("DtCheck")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("MastKey")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<int>("NumImp")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("VersNum")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("IdxInstall");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("InstalledReleases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
@@ -162,12 +377,48 @@ namespace LiMan.DB.Migrations
|
||||
b.ToTable("LogCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogCodImp", b =>
|
||||
{
|
||||
b.Property<int>("IdxLogCodImp")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogCodImp"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CodImpNew")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CodImpOld")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DtMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("IdxLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("IdxSubLic")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("IdxLogCodImp");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.HasIndex("IdxLic");
|
||||
|
||||
b.ToTable("LogCodImp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxLogLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxLogLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
@@ -204,12 +455,62 @@ namespace LiMan.DB.Migrations
|
||||
b.ToTable("LogLicenze");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxRel")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxRel"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("RelTags")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ReleaseDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("VersNum")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("VersText")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("IdxRel");
|
||||
|
||||
b.HasIndex("CodApp");
|
||||
|
||||
b.ToTable("Releases");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.StatsCallModel", b =>
|
||||
{
|
||||
b.Property<int>("YearRef")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CodInst")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("CodApp")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("TotCall")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("YearRef", "CodInst", "CodApp");
|
||||
|
||||
b.ToView("v_StatsCall");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.Property<int>("IdxSubLic")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxSubLic"), 1L, 1);
|
||||
|
||||
b.Property<string>("Chiave")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
@@ -237,8 +538,9 @@ namespace LiMan.DB.Migrations
|
||||
{
|
||||
b.Property<int>("IdxTicket")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("IdxTicket"), 1L, 1);
|
||||
|
||||
b.Property<string>("CodImpiego")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
@@ -289,6 +591,25 @@ namespace LiMan.DB.Migrations
|
||||
b.ToTable("TicketLog");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthClaimModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.AuthRoleModel", "RoleNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("RoleID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.AuthUserModel", "UserNav")
|
||||
.WithMany("Claims")
|
||||
.HasForeignKey("UserID")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RoleNav");
|
||||
|
||||
b.Navigation("UserNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.FileAttachModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.TicketModel", "TicketNav")
|
||||
@@ -300,6 +621,32 @@ namespace LiMan.DB.Migrations
|
||||
b.Navigation("TicketNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesHistoryModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.InstalledReleasesModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
@@ -315,6 +662,23 @@ namespace LiMan.DB.Migrations
|
||||
b.Navigation("InstallazioneNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogCodImp", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("IdxLic")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LogLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
@@ -338,6 +702,15 @@ namespace LiMan.DB.Migrations
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.ReleaseModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.ApplicativoModel", "ApplicativoNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CodApp");
|
||||
|
||||
b.Navigation("ApplicativoNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.SubLicenzaModel", b =>
|
||||
{
|
||||
b.HasOne("LiMan.DB.DBModels.LicenzaModel", "LicenzaNav")
|
||||
@@ -360,6 +733,16 @@ namespace LiMan.DB.Migrations
|
||||
b.Navigation("LicenzaNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthRoleModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.AuthUserModel", b =>
|
||||
{
|
||||
b.Navigation("Claims");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("LiMan.DB.DBModels.LicenzaModel", b =>
|
||||
{
|
||||
b.Navigation("Attivazioni");
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using System;
|
||||
using Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LiMan.UI.Data
|
||||
namespace LiMan.DB
|
||||
{
|
||||
public class SelectNext : SelectData
|
||||
{
|
||||
@@ -52,4 +54,4 @@ namespace LiMan.UI.Data
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,47 @@
|
||||
SET ANSI_NULLS ON
|
||||
GO
|
||||
|
||||
SET QUOTED_IDENTIFIER ON
|
||||
GO
|
||||
|
||||
|
||||
DROP PROCEDURE IF EXISTS dbo.stp_StatsCall_filt;
|
||||
GO
|
||||
|
||||
/*-- =============================================
|
||||
-- Author: S.E.L.
|
||||
-- Description: Estrazione dati statistiche call filtrati
|
||||
|
||||
EXEC dbo.stp_StatsCall_filt '2024-01-01', GETDATE(), ''
|
||||
|
||||
-- Mod. date: 2024.05.31
|
||||
-- =============================================*/
|
||||
CREATE PROCEDURE [dbo].[stp_StatsCall_filt]
|
||||
(
|
||||
@DtFrom DATETIME
|
||||
,@DtTo DATETIME
|
||||
,@SearchVal NVARCHAR(250)
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
SET NOCOUNT ON;
|
||||
SET XACT_ABORT ON;
|
||||
|
||||
WITH cteDati AS
|
||||
(
|
||||
SELECT YEAR(DataRif) AS YearRef, CodInst, CodApp, SUM(NumCall) AS TotCall
|
||||
FROM LogCall
|
||||
WHERE DataRif BETWEEN @DtFrom and @DtTo
|
||||
AND (@SearchVal = '' OR TargetUrl LIKE '%'+@SearchVal+'%')
|
||||
GROUP BY YEAR(DataRif), CodInst, CodApp
|
||||
)
|
||||
|
||||
SELECT *
|
||||
FROM cteDati
|
||||
ORDER BY YearRef DESC, TotCall DESC
|
||||
|
||||
END
|
||||
|
||||
|
||||
GO
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user