diff --git a/Thermo.Active.Model/Constants.cs b/Thermo.Active.Model/Constants.cs index 686c8649..28cd6d64 100644 --- a/Thermo.Active.Model/Constants.cs +++ b/Thermo.Active.Model/Constants.cs @@ -124,6 +124,17 @@ namespace Thermo.Active.Model EXTRACTION } + public enum TACT_SCHED_TASK + { + ND = 0, + PRE_HEAT + } + public enum TACT_SCHED_PERIOD + { + ND = 0, + DAY + } + public enum MAINTENANCE_UNIT_OF_MEASURE { mm = 0, diff --git a/Thermo.Active.Model/DTOModels/ThSchedulModels/DTOSchedTaskModels.cs b/Thermo.Active.Model/DTOModels/ThSchedulModels/DTOSchedTaskModels.cs new file mode 100644 index 00000000..d864e649 --- /dev/null +++ b/Thermo.Active.Model/DTOModels/ThSchedulModels/DTOSchedTaskModels.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using static Thermo.Active.Model.Constants; + +namespace Thermo.Active.Model.DTOModels.ThSchedulModels +{ + public class DTOSchedTaskModels + { + /// + /// Day of start + /// + public DayOfWeek day { get; set; } = DayOfWeek.Monday; + /// + /// Description + /// + public string description { get; set; } = ""; + /// + /// State of task (enabled/disabled) + /// + public bool enabled { get; set; } = false; + /// + /// Repetition period + /// + public TACT_SCHED_PERIOD period { get; set; } = TACT_SCHED_PERIOD.DAY; + /// + /// Associated SoftKey ID + /// + public int sKeyID { get; set; } = 0; + /// + /// Status Word + /// + public int statusCode { get; set; } = 0; + /// + /// Datetime trigger (TIME only) + /// + public TimeSpan time { get; set; } + /// + /// Type of TASK + /// + public TACT_SCHED_TASK type { get; set; } = TACT_SCHED_TASK.PRE_HEAT; + + public override bool Equals(object obj) + { + // Object is not a GaugeModel instance + if (!(obj is DTOSchedTaskModels item)) + return false; + if (day != item.day) + return false; + if (description != item.description) + return false; + if (enabled != item.enabled) + return false; + if (period != item.period) + return false; + if (sKeyID != item.sKeyID) + return false; + if (statusCode != item.statusCode) + return false; + if (time != item.time) + return false; + if (type!= item.type) + return false; + + return true; + } + + public override int GetHashCode() + { + return base.GetHashCode(); + } + + } +}