//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Tango Observables Generator
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. Do not modify!
//
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Serialization;
using Newtonsoft.Json;
using System.Linq;
using Tango.DAL.Remote.DB;
using Tango.Core;
using System.ComponentModel;
using Tango.Core.CustomAttributes;
namespace Tango.BL.Entities
{
[Table("HARDWARE_BLOWERS")]
public abstract class HardwareBlowerBase : ObservableEntity
{
public event EventHandler EnabledChanged;
public event EventHandler VoltageChanged;
public event EventHandler HeatingVoltageChanged;
public event EventHandler ActiveChanged;
public event EventHandler HardwareBlowerTypeChanged;
public event EventHandler HardwareVersionChanged;
protected String _hardwareblowertypeguid;
///
/// Gets or sets the hardwareblowerbase hardware blower type guid.
///
[Column("HARDWARE_BLOWER_TYPE_GUID")]
[ForeignKey("HardwareBlowerType")]
public String HardwareBlowerTypeGuid
{
get
{
return _hardwareblowertypeguid;
}
set
{
if (_hardwareblowertypeguid != value)
{
_hardwareblowertypeguid = value;
}
}
}
protected String _hardwareversionguid;
///
/// Gets or sets the hardwareblowerbase hardware version guid.
///
[Column("HARDWARE_VERSION_GUID")]
[ForeignKey("HardwareVersion")]
public String HardwareVersionGuid
{
get
{
return _hardwareversionguid;
}
set
{
if (_hardwareversionguid != value)
{
_hardwareversionguid = value;
}
}
}
protected Boolean _enabled;
///
/// Gets or sets the hardwareblowerbase enabled.
///
[Column("ENABLED")]
public Boolean Enabled
{
get
{
return _enabled;
}
set
{
if (_enabled != value)
{
_enabled = value;
OnEnabledChanged(value);
}
}
}
protected Double _voltage;
///
/// Voltage Description
///
[Column("VOLTAGE")]
[Description("Voltage Description")]
[Range(-10000,1000000)]
[StringFormat("0.0")]
public Double Voltage
{
get
{
return _voltage;
}
set
{
if (_voltage != value)
{
_voltage = value;
OnVoltageChanged(value);
}
}
}
protected Double _heatingvoltage;
///
/// Gets or sets the hardwareblowerbase heating voltage.
///
[Column("HEATING_VOLTAGE")]
public Double HeatingVoltage
{
get
{
return _heatingvoltage;
}
set
{
if (_heatingvoltage != value)
{
_heatingvoltage = value;
OnHeatingVoltageChanged(value);
}
}
}
protected Boolean _active;
///
/// Gets or sets the hardwareblowerbase active.
///
[Column("ACTIVE")]
public Boolean Active
{
get
{
return _active;
}
set
{
if (_active != value)
{
_active = value;
OnActiveChanged(value);
}
}
}
protected HardwareBlowerType _hardwareblowertype;
///
/// Gets or sets the hardwareblowerbase hardware blower types.
///
[XmlIgnore]
[JsonIgnore]
public virtual HardwareBlowerType HardwareBlowerType
{
get
{
return _hardwareblowertype;
}
set
{
if (_hardwareblowertype != value)
{
_hardwareblowertype = value;
if (HardwareBlowerType != null)
{
HardwareBlowerTypeGuid = HardwareBlowerType.Guid;
}
OnHardwareBlowerTypeChanged(value);
}
}
}
protected HardwareVersion _hardwareversion;
///
/// Gets or sets the hardwareblowerbase hardware versions.
///
[XmlIgnore]
[JsonIgnore]
public virtual HardwareVersion HardwareVersion
{
get
{
return _hardwareversion;
}
set
{
if (_hardwareversion != value)
{
_hardwareversion = value;
if (HardwareVersion != null)
{
HardwareVersionGuid = HardwareVersion.Guid;
}
OnHardwareVersionChanged(value);
}
}
}
///
/// Called when the Enabled has changed.
///
protected virtual void OnEnabledChanged(Boolean enabled)
{
EnabledChanged?.Invoke(this, enabled);
RaisePropertyChanged(nameof(Enabled));
}
///
/// Called when the Voltage has changed.
///
protected virtual void OnVoltageChanged(Double voltage)
{
VoltageChanged?.Invoke(this, voltage);
RaisePropertyChanged(nameof(Voltage));
}
///
/// Called when the HeatingVoltage has changed.
///
protected virtual void OnHeatingVoltageChanged(Double heatingvoltage)
{
HeatingVoltageChanged?.Invoke(this, heatingvoltage);
RaisePropertyChanged(nameof(HeatingVoltage));
}
///
/// Called when the Active has changed.
///
protected virtual void OnActiveChanged(Boolean active)
{
ActiveChanged?.Invoke(this, active);
RaisePropertyChanged(nameof(Active));
}
///
/// Called when the HardwareBlowerType has changed.
///
protected virtual void OnHardwareBlowerTypeChanged(HardwareBlowerType hardwareblowertype)
{
HardwareBlowerTypeChanged?.Invoke(this, hardwareblowertype);
RaisePropertyChanged(nameof(HardwareBlowerType));
}
///
/// Called when the HardwareVersion has changed.
///
protected virtual void OnHardwareVersionChanged(HardwareVersion hardwareversion)
{
HardwareVersionChanged?.Invoke(this, hardwareversion);
RaisePropertyChanged(nameof(HardwareVersion));
}
///
/// Initializes a new instance of the class.
///
public HardwareBlowerBase() : base()
{
}
}
}