ManufacturingPacketComponent.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. [NullEditor]
  17. public int Consumed { get; set; }
  18. public override ProductDimensions Dimensions { get; set; }
  19. /// <summary>
  20. /// When a picking list is creating for a <see cref="ManufacturingPacketComponent"/>, we save a link to the requisition,
  21. /// so that we don't require the same component twice.
  22. /// </summary>
  23. [NullEditor]
  24. public RequisitionLink Requisition { get; set; }
  25. static ManufacturingPacketComponent()
  26. {
  27. LinkedProperties.Register<ManufacturingPacketComponent, ProductLink, string>(x => x.Product, x => x.Name, x => x.Description);
  28. }
  29. }
  30. }