77 lines
2.2 KiB
C#
77 lines
2.2 KiB
C#
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 TACT_DOW day { get; set; } = TACT_DOW.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();
|
|
}
|
|
|
|
}
|
|
}
|