|
@@ -1,24 +1,109 @@
|
|
|
-using InABox.Core;
|
|
|
+using System;
|
|
|
+using InABox.Core;
|
|
|
|
|
|
namespace Comal.Classes
|
|
|
{
|
|
|
+
|
|
|
+
|
|
|
+ public class GPSTrackerPowerType : Entity, IRemotable, IPersistent, IMergeable, ILicense<GPSTrackerLicense>
|
|
|
+ {
|
|
|
+
|
|
|
+ [EditorSequence(1)]
|
|
|
+ [UniqueCodeEditor(Visible = Visible.Default, Editable = Editable.Enabled)]
|
|
|
+ public string Code { get; set; }
|
|
|
+
|
|
|
+ [EditorSequence(2)]
|
|
|
+ public string Description { get; set; }
|
|
|
+ }
|
|
|
+
|
|
|
+ public class GPSTrackerPowerTypeLink : EntityLink<GPSTrackerPowerType>
|
|
|
+ {
|
|
|
+ [CodePopupEditor(typeof(GPSTrackerPowerType), CanAdd=true)]
|
|
|
+ public override Guid ID { get; set; }
|
|
|
+
|
|
|
+ [CodeEditor(Visible = Visible.Default)]
|
|
|
+ public string Code { get; set; }
|
|
|
+
|
|
|
+ [TextBoxEditor(Visible = Visible.Optional)]
|
|
|
+ public string Description { get; set; }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public class GPSTrackerConnectivityType : Entity, IRemotable, IPersistent, IMergeable, ILicense<GPSTrackerLicense>
|
|
|
+ {
|
|
|
+ [EditorSequence(1)]
|
|
|
+ [UniqueCodeEditor(Visible = Visible.Default, Editable = Editable.Enabled)]
|
|
|
+ public string Code { get; set; }
|
|
|
+
|
|
|
+ [EditorSequence(2)]
|
|
|
+ public string Description { get; set; }
|
|
|
+ }
|
|
|
+
|
|
|
+ public class GPSTrackerConnectivityTypeLink : EntityLink<GPSTrackerConnectivityType>
|
|
|
+ {
|
|
|
+ [CodePopupEditor(typeof(GPSTrackerConnectivityType), CanAdd=true)]
|
|
|
+ public override Guid ID { get; set; }
|
|
|
+
|
|
|
+ [CodeEditor(Visible = Visible.Default)]
|
|
|
+ public string Code { get; set; }
|
|
|
+
|
|
|
+ [TextBoxEditor(Visible = Visible.Optional)]
|
|
|
+ public string Description { get; set; }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public class GPSTrackerLocationType : Entity, IRemotable, IPersistent, IMergeable, ILicense<GPSTrackerLicense>
|
|
|
+ {
|
|
|
+ [EditorSequence(1)]
|
|
|
+ [UniqueCodeEditor(Visible = Visible.Default, Editable = Editable.Enabled)]
|
|
|
+ public string Code { get; set; }
|
|
|
+
|
|
|
+ [EditorSequence(2)]
|
|
|
+ public string Description { get; set; }
|
|
|
+ }
|
|
|
+
|
|
|
+ public class GPSTrackerLocationTypeLink : EntityLink<GPSTrackerLocationType>
|
|
|
+ {
|
|
|
+ [CodePopupEditor(typeof(GPSTrackerLocationType), CanAdd=true)]
|
|
|
+ public override Guid ID { get; set; }
|
|
|
+
|
|
|
+ [CodeEditor(Visible = Visible.Default)]
|
|
|
+ public string Code { get; set; }
|
|
|
+
|
|
|
+ [TextBoxEditor(Visible = Visible.Optional)]
|
|
|
+ public string Description { get; set; }
|
|
|
+ }
|
|
|
+
|
|
|
public class GPSBatteryFormulaModel : IExpressionModel<double>
|
|
|
{
|
|
|
public double BatteryLevel { get; set; }
|
|
|
}
|
|
|
|
|
|
[UserTracking(typeof(GPSTracker))]
|
|
|
- public class GPSTrackerType : Entity, IGPSTrackerType, IRemotable, IPersistent, ILicense<GPSTrackerLicense>, IExportable, IImportable
|
|
|
+ public class GPSTrackerType : Entity, IGPSTrackerType, IRemotable, IPersistent, ILicense<GPSTrackerLicense>, IExportable, IImportable, IMergeable
|
|
|
{
|
|
|
+ [EditorSequence(1)]
|
|
|
[TextBoxEditor(Visible = Visible.Default, Editable = Editable.Enabled)]
|
|
|
public string Description { get; set; }
|
|
|
|
|
|
+ [EditorSequence(2)]
|
|
|
+ public GPSTrackerPowerTypeLink Power { get; set; }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// An expression (see <see cref="CoreExpression"/>) that should always return a percentage battery level remaining.
|
|
|
/// <br/><br/>
|
|
|
/// If null, fills the battery level on GPS Tracker Location with either a voltage or a battery level - whatever OEM returns.
|
|
|
/// </summary>
|
|
|
+ [EditorSequence(3)]
|
|
|
[ExpressionEditor(typeof(GPSBatteryFormulaModel), Visible = Visible.Optional)]
|
|
|
public string? BatteryFormula { get; set; }
|
|
|
+
|
|
|
+ [EditorSequence(4)]
|
|
|
+ public GPSTrackerConnectivityTypeLink Connectivity { get; set; }
|
|
|
+
|
|
|
+ [EditorSequence(5)]
|
|
|
+ public GPSTrackerLocationTypeLink LocationType { get; set; }
|
|
|
+
|
|
|
+ public override string ToString() => Description;
|
|
|
}
|
|
|
}
|