using System; using DataModel.Helpers; using DataModel.ViewModels; namespace DataModel.Models { /// /// JDE profit center model /// public class ProfitCenter : IBusinessUnit { /// /// Profit center unique code /// public string Code { get; set; } /// /// Profit center description /// public string Description { get; set; } /// /// Date of last update to record /// private int LastUpdateDate { get; } /// /// Time of day of last update to record /// private int LastUpdateTime { get; } /// /// Timestamp of last update to record /// public DateTime LastUpdateDT => LastUpdateDate.FromJDEDate().FromJDEDateTime(LastUpdateTime); /// /// Converts object to view model /// /// Projected view model for object public ProfitCenterViewModel ToViewModel() { return new ProfitCenterViewModel() { Code = Code, Description = Description }; } } }