2020-02-12 14:16:19 +00:00
|
|
|
|
using NodaTime;
|
|
|
|
|
|
2021-08-07 20:39:32 +00:00
|
|
|
|
|
|
|
|
|
|
2020-02-12 14:16:19 +00:00
|
|
|
|
namespace PluralKit.Core {
|
2021-08-07 20:39:32 +00:00
|
|
|
|
|
|
|
|
|
public readonly struct SwitchId: INumericId<SwitchId, int>
|
|
|
|
|
{
|
|
|
|
|
public int Value { get; }
|
|
|
|
|
|
|
|
|
|
public SwitchId(int value)
|
|
|
|
|
{
|
|
|
|
|
Value = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Equals(SwitchId other) => Value == other.Value;
|
|
|
|
|
|
|
|
|
|
public override bool Equals(object obj) => obj is SwitchId other && Equals(other);
|
|
|
|
|
|
|
|
|
|
public override int GetHashCode() => Value;
|
|
|
|
|
|
|
|
|
|
public static bool operator ==(SwitchId left, SwitchId right) => left.Equals(right);
|
|
|
|
|
|
|
|
|
|
public static bool operator !=(SwitchId left, SwitchId right) => !left.Equals(right);
|
|
|
|
|
|
|
|
|
|
public int CompareTo(SwitchId other) => Value.CompareTo(other.Value);
|
|
|
|
|
|
|
|
|
|
public override string ToString() => $"Switch #{Value}";
|
|
|
|
|
}
|
|
|
|
|
|
2020-02-12 14:16:19 +00:00
|
|
|
|
public class PKSwitch
|
|
|
|
|
{
|
2020-06-14 19:37:04 +00:00
|
|
|
|
public SwitchId Id { get; }
|
|
|
|
|
public SystemId System { get; set; }
|
2020-06-13 11:11:08 +00:00
|
|
|
|
public Instant Timestamp { get; }
|
2020-02-12 14:16:19 +00:00
|
|
|
|
}
|
|
|
|
|
}
|