Files
gpw_next/GPW.CORE.Data/DbModels/RegAttivitaModel.cs
T
2022-01-26 14:38:18 +01:00

54 lines
1.6 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace GPW.CORE.Data.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("RegAttivita")]
public partial class RegAttivitaModel
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int IdxRa { get; set; }
public int IdxDipendente { get; set; } = 0;
public int IdxFase { get; set; }
public DateTime Inizio { get; set; }
public DateTime Fine { get; set; }
public string? Descrizione { get; set; }
/// <summary>
/// Ore Attività - prima era ([dbo].[f_hourInterval]([inizio],[fine])) poi sostituita per performance
/// </summary>
public decimal? OreTot { get; set; }
[NotMapped]
public TimeSpan Durata
{
get
{
TimeSpan valore = TimeSpan.FromHours(0);
if (OreTot != null)
{
try
{
valore = TimeSpan.FromHours((double)OreTot);
}
catch (Exception exc)
{ }
}
return valore;
}
}
public decimal? Importo { get; set; }
[ForeignKey("IdxDipendente")]
public virtual DipendentiModel? DipNav { get; set; }
[ForeignKey("IdxFase")]
public virtual AnagFasiModel? FasiNav { get; set; }
}
}