ManufacturingPacketComponent.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using InABox.Core;
  2. namespace Comal.Classes
  3. {
  4. [UserTracking(typeof(ManufacturingPacket))]
  5. [Caption("Components")]
  6. public class ManufacturingPacketComponent : DimensionedEntity<ProductDimensions>, IRemotable, IPersistent, IOneToMany<ManufacturingPacket>, ILicense<ManufacturingLicense>
  7. {
  8. [EntityRelationship(DeleteAction.Cascade)]
  9. public ManufacturingPacketLink Packet { get; set; }
  10. [EntityRelationship(DeleteAction.SetNull)]
  11. public ProductLink Product { get; set; }
  12. [TextBoxEditor]
  13. [EditorSequence(1)]
  14. public string Description { get; set; }
  15. public int Quantity { get; set; }
  16. public override ProductDimensions Dimensions { get; set; }
  17. /// <summary>
  18. /// When a picking list is creating for a <see cref="ManufacturingPacketComponent"/>, we save a link to the requisition,
  19. /// so that we don't require the same component twice.
  20. /// </summary>
  21. [NullEditor]
  22. public RequisitionLink Requisition { get; set; }
  23. static ManufacturingPacketComponent()
  24. {
  25. LinkedProperties.Register<ManufacturingPacketComponent, ProductLink, string>(x => x.Product, x => x.Name, x => x.Description);
  26. }
  27. }
  28. }