KanbanReference.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using System;
  2. using InABox.Core;
  3. namespace Comal.Classes
  4. {
  5. public abstract class EntityKanban<TEntity, TLink> : Entity, IRemotable, IPersistent, ILicense<TaskManagementLicense>
  6. where TEntity : Entity
  7. where TLink : IEntityLink<TEntity>, new()
  8. {
  9. [EntityRelationship(DeleteAction.Cascade)]
  10. public TLink Entity { get; set; }
  11. [EntityRelationship(DeleteAction.Cascade)]
  12. public KanbanLink Kanban { get; set; }
  13. protected override void Init()
  14. {
  15. base.Init();
  16. Kanban = new KanbanLink();
  17. Entity = new TLink();
  18. }
  19. }
  20. public class RequisitionKanban : EntityKanban<Requisition, RequisitionLink>
  21. {
  22. }
  23. public class SetoutKanban : EntityKanban<Setout, SetoutLink>
  24. {
  25. }
  26. public class DeliveryKanban : EntityKanban<Delivery, DeliveryLink>
  27. {
  28. }
  29. public class PurchaseOrderKanban : EntityKanban<PurchaseOrder, PurchaseOrderLink>
  30. {
  31. }
  32. public class ManufacturingPacketKanban : EntityKanban<ManufacturingPacket, ManufacturingPacketLink>
  33. {
  34. }
  35. public class JobRequisitionKanban : EntityKanban<JobRequisition, JobRequisitionLink>
  36. {
  37. }
  38. [Obsolete("Replaced with EntityKanban", false)]
  39. [UserTracking(typeof(Kanban))]
  40. public class KanbanReference : Entity, IPersistent, IRemotable, ILicense<TaskManagementLicense>
  41. {
  42. [EntityRelationship(DeleteAction.Cascade)]
  43. public KanbanLink Kanban { get; set; }
  44. public Guid KanbanID { get; set; }
  45. public string LinkType { get; set; }
  46. public Guid LinkID { get; set; }
  47. public string LinkProperty { get; set; }
  48. public PackableStringDictionary Data { get; set; }
  49. protected override void Init()
  50. {
  51. base.Init();
  52. Data = new PackableStringDictionary();
  53. Kanban = new KanbanLink();
  54. }
  55. }
  56. }