using InABox.Core; namespace Comal.Classes { public enum ProductPriceType { FixedPrice, CostPlus } [UserTracking(typeof(Product))] public class CustomerProduct : Entity, IPersistent, IRemotable, IManyToMany, ILicense, IExportable, IImportable { [EntityRelationship(DeleteAction.Cascade)] [EditorSequence(0)] public CustomerLink CustomerLink { get; set; } [EntityRelationship(DeleteAction.Cascade)] [EditorSequence(1)] public ProductLink ProductLink { get; set; } [EnumLookupEditor(typeof(ProductPriceType))] [EditorSequence(2)] public ProductPriceType PriceType { get; set; } [CurrencyEditor] [EditorSequence(3)] public double Price { get; set; } [DoubleEditor] [EditorSequence(4)] public double Markup { get; set; } protected override void Init() { base.Init(); CustomerLink = new CustomerLink(); ProductLink = new ProductLink(() => this); } } }