using _0_Framework.Application; using _0_Framework.Domain; using Company.Domain.RollCallEmployeeAgg; using System; namespace Company.Domain.RollCallEmployeeStatusAgg { public class RollCallEmployeeStatus : EntityBaseWithoutCreationDate { public long RollCallEmployeeId { get; private set; } public RollCallEmployee RollCallEmployee { get; private set; } public DateTime StartDate { get; private set; } public DateTime EndDate { get; private set; } public RollCallEmployeeStatus(long rollCallEmployeeId, DateTime startDate, DateTime endDate) { RollCallEmployeeId = rollCallEmployeeId; StartDate = startDate; EndDate = endDate; } public RollCallEmployeeStatus(long rollCallEmployeeId, DateTime startDate) { RollCallEmployeeId = rollCallEmployeeId; StartDate = startDate; EndDate = Tools.GetUndefinedDateTime(); } public void Edit(DateTime startDate, DateTime endDate) { StartDate = startDate; EndDate = endDate; } public void Deactivate(DateTime endDate) { EndDate = endDate; } } }