sépare le modèle client du serveur, et crée par la même la librairie Yavsc.Api
This commit is contained in:
parent
47af58586f
commit
d3ba13c0cf
101 changed files with 5754 additions and 91 deletions
|
|
@ -1,30 +0,0 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Market
|
||||
{
|
||||
public partial class BaseProduct
|
||||
{
|
||||
/// <summary>
|
||||
/// An unique product identifier.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Key(),DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// A contractual description for this product.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Controls wether this product or service
|
||||
/// may be offered to clients, or simply
|
||||
/// are internal workflow entry point.
|
||||
/// </summary>
|
||||
/// <returns>true when this product belongs to the public catalog.</returns>
|
||||
public bool Public { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Models.Market {
|
||||
|
||||
|
||||
public class Catalog {
|
||||
public List<Product> Products { get; set; }
|
||||
public List<Service> Services { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
|
||||
|
||||
namespace Yavsc.Models.Market
|
||||
{
|
||||
public partial class Product : BaseProduct
|
||||
{
|
||||
/// <summary>
|
||||
/// Weight in gram
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public decimal Weight { get; set; }
|
||||
/// <summary>
|
||||
/// Height in meter
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public decimal Height { get; set; }
|
||||
/// <summary>
|
||||
/// Width in meter
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public decimal Width { get; set; }
|
||||
public decimal Depth { get; set; }
|
||||
/// <summary>
|
||||
/// In euro
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public decimal? Price { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
|
||||
namespace Yavsc.Models.Market {
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
public enum BillingMode {
|
||||
Unitary,
|
||||
SetPrice,
|
||||
ByExecutionTime
|
||||
}
|
||||
public partial class Service : BaseProduct
|
||||
{
|
||||
public string ContextId { get; set; }
|
||||
[ForeignKey("ContextId")]
|
||||
public virtual Activity Context { get; set; }
|
||||
|
||||
public BillingMode? Billing { get; set; }
|
||||
// TODO public ServiceSpecification Specification { get; set; }
|
||||
/// <summary>
|
||||
/// In euro, either by hour or by release
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public decimal? Pricing { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue