ManufacturingPacketComponent.cs 884 B

123456789101112131415161718192021222324252627
  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. public int Quantity { get; set; }
  13. public override ProductDimensions Dimensions { get; set; }
  14. protected override void Init()
  15. {
  16. base.Init();
  17. Packet = new ManufacturingPacketLink();
  18. Product = new ProductLink(() => this);
  19. Dimensions = new ProductDimensions(() => this);
  20. }
  21. }
  22. }