CustomerProduct.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using InABox.Core;
  3. namespace Comal.Classes
  4. {
  5. public interface ICustomerProduct
  6. {
  7. CustomerLink Customer { get; set; }
  8. ProductLink Product { get; set; }
  9. double Discount { get; set; }
  10. }
  11. [UserTracking(typeof(Product))]
  12. public class CustomerProduct : Entity, IPersistent, IRemotable,
  13. ICustomerProduct,
  14. IManyToMany<Customer, Product>,
  15. IManyToMany<Product, Customer>,
  16. ILicense<ProductManagementLicense>,
  17. IExportable,
  18. IImportable
  19. {
  20. [EntityRelationship(DeleteAction.Cascade)]
  21. [EditorSequence(1)]
  22. public CustomerLink Customer { get; set; }
  23. [EntityRelationship(DeleteAction.Cascade)]
  24. [EditorSequence(2)]
  25. public ProductLink Product { get; set; }
  26. [EditorSequence(3)]
  27. [Comment("Discount for this product, given as a percentage.")]
  28. public double Discount { get; set; }
  29. [Obsolete("Replaced by Discount")]
  30. public ProductCharge Charge { get; set; }
  31. }
  32. }