mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
feat: move PD Core into Essentials
This commit is contained in:
87
src/PepperDash.Core/WebApi/Presets/Preset.cs
Normal file
87
src/PepperDash.Core/WebApi/Presets/Preset.cs
Normal file
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
|
||||
namespace PepperDash.Core.WebApi.Presets
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a preset
|
||||
/// </summary>
|
||||
public class Preset
|
||||
{
|
||||
/// <summary>
|
||||
/// ID of preset
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// User ID
|
||||
/// </summary>
|
||||
public int UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Room Type ID
|
||||
/// </summary>
|
||||
public int RoomTypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Preset Name
|
||||
/// </summary>
|
||||
public string PresetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Preset Number
|
||||
/// </summary>
|
||||
public int PresetNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Preset Data
|
||||
/// </summary>
|
||||
public string Data { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public Preset()
|
||||
{
|
||||
PresetName = "";
|
||||
PresetNumber = 1;
|
||||
Data = "{}";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class PresetReceivedEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// True when the preset is found
|
||||
/// </summary>
|
||||
public bool LookupSuccess { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// S+ helper
|
||||
/// </summary>
|
||||
public ushort ULookupSuccess { get { return (ushort)(LookupSuccess ? 1 : 0); } }
|
||||
|
||||
/// <summary>
|
||||
/// The preset
|
||||
/// </summary>
|
||||
public Preset Preset { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// For Simpl+
|
||||
/// </summary>
|
||||
public PresetReceivedEventArgs() { }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="preset"></param>
|
||||
/// <param name="success"></param>
|
||||
public PresetReceivedEventArgs(Preset preset, bool success)
|
||||
{
|
||||
LookupSuccess = success;
|
||||
Preset = preset;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user