Created
June 19, 2016 23:10
-
-
Save eestein/5a657ebe1ead739eaac5b00f2043bebe to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Table("Employees", Schema = "MyAppSchema")] | |
public class EmployeeProfile : Profile | |
{ | |
/// <summary> | |
/// Id da empresa | |
/// </summary> | |
public int CompanyId { get; set; } | |
/// <summary> | |
/// Empresa | |
/// </summary> | |
[ForeignKey("CompanyId")] | |
public virtual Company Company { get; set; } | |
/// <summary> | |
/// Posição | |
/// </summary> | |
public EmployeeRank Rank { get; set; } | |
/// <summary> | |
/// Data de associação | |
/// </summary> | |
public DateTime JoinDate { get; set; } | |
/// <summary> | |
/// Data de remoção | |
/// </summary> | |
public DateTime? RemovalDate { get; set; } | |
/// <summary> | |
/// Indica se o funcionário está ativo | |
/// </summary> | |
public virtual bool IsActive => !RemovalDate.HasValue || DateTime.Now <= RemovalDate.Value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment