Add model x sched task
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Day of start
|
||||
/// </summary>
|
||||
public DayOfWeek day { get; set; } = DayOfWeek.Monday;
|
||||
/// <summary>
|
||||
/// Description
|
||||
/// </summary>
|
||||
public string description { get; set; } = "";
|
||||
/// <summary>
|
||||
/// State of task (enabled/disabled)
|
||||
/// </summary>
|
||||
public bool enabled { get; set; } = false;
|
||||
/// <summary>
|
||||
/// Repetition period
|
||||
/// </summary>
|
||||
public TACT_SCHED_PERIOD period { get; set; } = TACT_SCHED_PERIOD.DAY;
|
||||
/// <summary>
|
||||
/// Associated SoftKey ID
|
||||
/// </summary>
|
||||
public int sKeyID { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Status Word
|
||||
/// </summary>
|
||||
public int statusCode { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Datetime trigger (TIME only)
|
||||
/// </summary>
|
||||
public TimeSpan time { get; set; }
|
||||
/// <summary>
|
||||
/// Type of TASK
|
||||
/// </summary>
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user