//------------------------------------------------------------------------------ // // 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("MACHINES_EVENTS")] public abstract class MachinesEventBase : ObservableEntity { public event EventHandler HostNameChanged; public event EventHandler DateTimeChanged; public event EventHandler DescriptionChanged; public event EventHandler IsSynchronizedChanged; public event EventHandler EventTypeChanged; public event EventHandler MachineChanged; public event EventHandler UserChanged; protected String _hostname; /// /// Gets or sets the machineseventbase host name. /// [Column("HOST_NAME")] public String HostName { get { return _hostname; } set { if (_hostname != value) { _hostname = value; OnHostNameChanged(value); } } } protected String _machineguid; /// /// Gets or sets the machineseventbase machine guid. /// [Column("MACHINE_GUID")] [ForeignKey("Machine")] public String MachineGuid { get { return _machineguid; } set { if (_machineguid != value) { _machineguid = value; } } } protected String _eventtypeguid; /// /// Gets or sets the machineseventbase event type guid. /// [Column("EVENT_TYPE_GUID")] [ForeignKey("EventType")] public String EventTypeGuid { get { return _eventtypeguid; } set { if (_eventtypeguid != value) { _eventtypeguid = value; } } } protected String _userguid; /// /// Gets or sets the machineseventbase user guid. /// [Column("USER_GUID")] [ForeignKey("User")] public String UserGuid { get { return _userguid; } set { if (_userguid != value) { _userguid = value; } } } protected DateTime _datetime; /// /// Gets or sets the machineseventbase date time. /// [Column("DATE_TIME")] public DateTime DateTime { get { return _datetime; } set { if (_datetime != value) { _datetime = value; OnDateTimeChanged(value); } } } protected String _description; /// /// Gets or sets the machineseventbase description. /// [Column("DESCRIPTION")] public String Description { get { return _description; } set { if (_description != value) { _description = value; OnDescriptionChanged(value); } } } protected Boolean _issynchronized; /// /// Gets or sets the machineseventbase is synchronized. /// [Column("IS_SYNCHRONIZED")] public Boolean IsSynchronized { get { return _issynchronized; } set { if (_issynchronized != value) { _issynchronized = value; OnIsSynchronizedChanged(value); } } } protected EventType _eventtype; /// /// Gets or sets the machineseventbase event types. /// [XmlIgnore] [JsonIgnore] public virtual EventType EventType { get { return _eventtype; } set { if (_eventtype != value) { _eventtype = value; if (EventType != null) { EventTypeGuid = EventType.Guid; } OnEventTypeChanged(value); } } } protected Machine _machine; /// /// Gets or sets the machineseventbase machine. /// [XmlIgnore] [JsonIgnore] public virtual Machine Machine { get { return _machine; } set { if (_machine != value) { _machine = value; if (Machine != null) { MachineGuid = Machine.Guid; } OnMachineChanged(value); } } } protected User _user; /// /// Gets or sets the machineseventbase user. /// [XmlIgnore] [JsonIgnore] public virtual User User { get { return _user; } set { if (_user != value) { _user = value; if (User != null) { UserGuid = User.Guid; } OnUserChanged(value); } } } /// /// Called when the HostName has changed. /// protected virtual void OnHostNameChanged(String hostname) { HostNameChanged?.Invoke(this, hostname); RaisePropertyChanged(nameof(HostName)); } /// /// Called when the DateTime has changed. /// protected virtual void OnDateTimeChanged(DateTime datetime) { DateTimeChanged?.Invoke(this, datetime); RaisePropertyChanged(nameof(DateTime)); } /// /// Called when the Description has changed. /// protected virtual void OnDescriptionChanged(String description) { DescriptionChanged?.Invoke(this, description); RaisePropertyChanged(nameof(Description)); } /// /// Called when the IsSynchronized has changed. /// protected virtual void OnIsSynchronizedChanged(Boolean issynchronized) { IsSynchronizedChanged?.Invoke(this, issynchronized); RaisePropertyChanged(nameof(IsSynchronized)); } /// /// Called when the EventType has changed. /// protected virtual void OnEventTypeChanged(EventType eventtype) { EventTypeChanged?.Invoke(this, eventtype); RaisePropertyChanged(nameof(EventType)); } /// /// Called when the Machine has changed. /// protected virtual void OnMachineChanged(Machine machine) { MachineChanged?.Invoke(this, machine); RaisePropertyChanged(nameof(Machine)); } /// /// Called when the User has changed. /// protected virtual void OnUserChanged(User user) { UserChanged?.Invoke(this, user); RaisePropertyChanged(nameof(User)); } /// /// Initializes a new instance of the class. /// public MachinesEventBase() : base() { } } }