123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- 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, 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;
- }
- }
|