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; }
///
/// Codice/Nome applicativo
///
public string CodApp { get; set; } = "";
///
/// Versione applicativo formato semver numerico 4 blocchi
///
public string VersNum { get; set; } = "0.0.0.0";
///
/// Versione applicativo, formato testuale libero, può essere uguale a VersNum
///
public string VersText { get; set; } = "0.1a2";
///
/// Versione (calcolata) a partire dal valore Num
///
[NotMapped]
public Version VersVal
{
get => new Version(VersNum);
//{
// Version answ = new Version();
// Version.TryParse(VersNum, out answ);
// return answ;
//}
}
///
/// Data di release
///
public DateTime ReleaseDate { get; set; } = DateTime.Today.AddYears(100);
[ForeignKey("CodApp")]
public virtual ApplicativoModel ApplicativoNav { get; set; }
}
}