refactoring

This commit is contained in:
2017-05-02 13:10:23 +02:00
parent 63044b0efd
commit d590df1c92
40 changed files with 161 additions and 103 deletions

View File

@ -2,9 +2,8 @@ using System.Collections.Generic;
namespace Yavsc.Models.Market {
public class Catalog {
public List<Product> Products { get; set; }
public List<Service> Services { get; set; }
}
}
}

View File

@ -3,8 +3,8 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Market {
using System.ComponentModel.DataAnnotations;
using Billing;
using Workflow;
using Yavsc.Models.Billing;
public class Service : BaseProduct
{
@ -14,27 +14,27 @@ namespace Yavsc.Models.Market {
/// <returns></returns>
[Key(),DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public string ContextId { get; set; }
[ForeignKey("ContextId")]
public virtual Activity Context { get; set; }
/// <summary>
/// List of billing clause,
/// associated to this service,
/// associated to this service,
/// that defines the transformation rules
/// to take in account during the transformation
/// of a corresponding prestation to an amount to pay.
/// This property is built at constructing a new instance
/// and is not mapped in database.
/// and is not mapped in database.
/// For the moment, it's hard coded only.
/// </summary>
/// <returns></returns>
[NotMapped]
public List<IBillingClause> Billing { get; set; }
}
}
}