This commit is contained in:
parent
46f5c107b8
commit
fa34ed249b
233 changed files with 4000 additions and 1396 deletions
30
Yavsc/Model/Market/BaseProduct.cs
Normal file
30
Yavsc/Model/Market/BaseProduct.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
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; }
|
||||
}
|
||||
|
||||
}
|
||||
10
Yavsc/Model/Market/Catalog.cs
Normal file
10
Yavsc/Model/Market/Catalog.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Models {
|
||||
|
||||
|
||||
public class Catalog {
|
||||
public List<Product> Products { get; set; }
|
||||
public List<Service> Services { get; set; }
|
||||
}
|
||||
}
|
||||
30
Yavsc/Model/Market/Product.cs
Normal file
30
Yavsc/Model/Market/Product.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
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; }
|
||||
}
|
||||
|
||||
}
|
||||
26
Yavsc/Model/Market/Service.cs
Normal file
26
Yavsc/Model/Market/Service.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
namespace Yavsc.Models {
|
||||
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