| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- using System;
- using InABox.Core;
- namespace Comal.Classes
- {
- public class JobTrackerLink : EntityLink<JobTracker>
- {
- protected override void Init()
- {
- base.Init();
- JobLink = new JobLink();
- }
- [LookupEditor(typeof(JobTracker))]
- public override Guid ID { get; set; }
- [NullEditor]
- public JobLink JobLink { get; set; }
- [TextBoxEditor(Editable = Editable.Hidden)]
- public string Gate { get; set; }
- }
- [UserTracking(typeof(GPSTracker))]
- public class JobTracker : Entity, IPersistent, IRemotable, IManyToMany<Job, GPSTracker>, ILicense<GPSTrackerLicense>
- {
- [EditorSequence(1)]
- [EntityRelationship(DeleteAction.Cascade)]
- public JobLink JobLink { get; set; }
- [EditorSequence(2)]
- [EntityRelationship(DeleteAction.SetNull)]
- public GPSTrackerLink TrackerLink { get; set; }
- [EditorSequence(3)]
- public string Gate { get; set; }
- [EditorSequence(4)]
- public bool Active { get; set; }
- // If a mobile app finds one of these tiles
- // this flag should indicate whether to log them onto
- // the associated job or not.
- [EditorSequence(5)]
- public bool IsJobSite { get; set; }
- protected override void Init()
- {
- base.Init();
- TrackerLink = new GPSTrackerLink();
- JobLink = new JobLink();
- }
- }
- }
|