Aggiunta modello dati gestione enroll + metodi di base
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>License Manager</i>
|
||||
<h4>Versione: 1.1.2410.1818</h4>
|
||||
<h4>Versione: 1.1.2412.3111</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2410.1818
|
||||
1.1.2412.3111
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2410.1818</version>
|
||||
<version>1.1.2412.3111</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>
|
||||
|
||||
@@ -608,7 +608,6 @@ namespace LiMan.DB.Controllers
|
||||
List<AuthRoleModel> dbResult = new List<AuthRoleModel>();
|
||||
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
|
||||
{
|
||||
DateTime oggi = DateTime.Today;
|
||||
dbResult = localDbCtx
|
||||
.DbSetRoles
|
||||
.ToList();
|
||||
@@ -740,6 +739,145 @@ namespace LiMan.DB.Controllers
|
||||
//Log.Info("Dispose di GWMSController");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Elimino una richiesta enroll (anche se già approvata...)
|
||||
/// </summary>
|
||||
/// <param name="delRec">record da eliminare</param>
|
||||
public bool EnrollReqDelete(int idReq)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
|
||||
{
|
||||
// se trovo... procedo...
|
||||
var rec2del = localDbCtx
|
||||
.DbSetEnrollReq
|
||||
.Where(x => x.IdReq == idReq)
|
||||
.FirstOrDefault();
|
||||
if (rec2del != null)
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetEnrollReq
|
||||
.Remove(rec2del);
|
||||
// salvo
|
||||
localDbCtx.SaveChanges();
|
||||
fatto = true;
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
/// <summary>
|
||||
/// Elimino eventuali richieste non approvate e scadute
|
||||
/// </summary>
|
||||
/// <param name="delRec">record da eliminare</param>
|
||||
public bool EnrollReqPurgeInvalid(int idReq)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
|
||||
{
|
||||
List<EnrollRequestModel> item2del = new List<EnrollRequestModel>();
|
||||
|
||||
// cerco in primis richieste NON associate a licenza
|
||||
var list2check = localDbCtx
|
||||
.DbSetEnrollReq
|
||||
.Where(x => x.IdxLic == 0)
|
||||
.ToList();
|
||||
var list2del = list2check
|
||||
.Where(x => x.IsScaduta)
|
||||
.ToList();
|
||||
if (list2del != null)
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetEnrollReq
|
||||
.RemoveRange(list2del);
|
||||
// salvo
|
||||
int numDone = localDbCtx.SaveChanges();
|
||||
fatto = numDone != 0;
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco completo Enroll Req
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<EnrollRequestModel> EnrollReqGetAll()
|
||||
{
|
||||
List<EnrollRequestModel> dbResult = new List<EnrollRequestModel>();
|
||||
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetEnrollReq
|
||||
.OrderByDescending(x => x.DtReq)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
/// <summary>
|
||||
/// Elenco filtrato Enroll Req x data
|
||||
/// </summary>
|
||||
/// <param name="dtFrom"></param>
|
||||
/// <param name="dtTo"></param>
|
||||
/// <returns></returns>
|
||||
public List<EnrollRequestModel> EnrollReqGetFilt(DateTime dtFrom, DateTime dtTo)
|
||||
{
|
||||
List<EnrollRequestModel> dbResult = new List<EnrollRequestModel>();
|
||||
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetEnrollReq
|
||||
.Where(x => x.DtReq >= dtFrom && x.DtReq <= dtTo)
|
||||
.OrderByDescending(x => x.DtReq)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Upsert record richiesta enroll
|
||||
/// </summary>
|
||||
/// <param name="newRec"></param>
|
||||
/// <returns></returns>
|
||||
public bool EnrollReqUpsert(EnrollRequestModel newRec)
|
||||
{
|
||||
bool answ = false;
|
||||
using (LMDbContext localDbCtx = new LMDbContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currData = localDbCtx
|
||||
.DbSetEnrollReq
|
||||
.Where(x => x.IdReq == newRec.IdReq && newRec.IdReq > 0)
|
||||
.FirstOrDefault();
|
||||
if (currData != null)
|
||||
{
|
||||
currData.Passcode = newRec.Passcode;
|
||||
currData.ReqPayload = newRec.ReqPayload;
|
||||
currData.DtReq = newRec.DtReq;
|
||||
currData.DtAppr = newRec.DtAppr;
|
||||
currData.UserAppr = newRec.UserAppr;
|
||||
currData.IdxLic = newRec.IdxLic;
|
||||
// segno aggiornato
|
||||
localDbCtx.Entry(currData).State = EntityState.Modified;
|
||||
}
|
||||
else
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetEnrollReq
|
||||
.Add(newRec);
|
||||
}
|
||||
localDbCtx.SaveChanges();
|
||||
answ = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Errore in EnrollReqUpsert | Passcode: {newRec.Passcode} | DtReq: {newRec.DtReq}{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco files attach da registrare
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
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 epr autorizzare (rnd 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 > 15;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,6 +61,7 @@ namespace LiMan.DB
|
||||
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; }
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,6 +121,37 @@ namespace LiMan.DB.Migrations
|
||||
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")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>License Manager</i>
|
||||
<h4>Versione: 1.1.2410.1618</h4>
|
||||
<h4>Versione: 1.1.2412.3111</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2410.1618
|
||||
1.1.2412.3111
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2410.1618</version>
|
||||
<version>1.1.2412.3111</version>
|
||||
<url>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/LiMan.Transfer.zip</url>
|
||||
<changelog>https://nexus.steamware.net/repository/SWS/LiMan/stable/LAST/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Version>1.1.2410.2117</Version>
|
||||
<Version>1.1.2412.3111</Version>
|
||||
<RootNamespace>LiMan.UI</RootNamespace>
|
||||
<AssemblyName>LiMan.UI</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>License Manager</i>
|
||||
<h4>Versione: 1.1.2410.2117</h4>
|
||||
<h4>Versione: 1.1.2412.3111</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.1.2410.2117
|
||||
1.1.2412.3111
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2410.2117</version>
|
||||
<version>1.1.2412.3111</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>
|
||||
|
||||
Reference in New Issue
Block a user