ade4d736a0
- esteso modello info x applicazione e release - nuovi metodi rest x caricare release - creazione app mancanti
81 lines
2.6 KiB
C#
81 lines
2.6 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|