Files
limanapp/LiMan.DB/DBModels/ReleaseModel.cs
T

55 lines
1.5 KiB
C#

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>
/// Versione (calcolata) a partire dal valore Num
/// </summary>
[NotMapped]
public Version VersVal
{
get => new Version(VersNum);
//{
// Version answ = new Version();
// Version.TryParse(VersNum, out answ);
// return answ;
//}
}
/// <summary>
/// Data di release
/// </summary>
public DateTime ReleaseDate { get; set; } = DateTime.Today.AddYears(100);
[ForeignKey("CodApp")]
public virtual ApplicativoModel ApplicativoNav { get; set; }
}
}