refactoring

This commit is contained in:
2017-02-27 19:28:32 +01:00
parent 78e5ec16ce
commit 9973f0dcc7
57 changed files with 3371 additions and 251 deletions

View File

@ -1,16 +1,10 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Market
{
public partial class BaseProduct
public 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.

View File

@ -1,9 +1,15 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Market
{
public partial class Product : BaseProduct
public class Product : BaseProduct
{
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
/// <summary>
/// Weight in gram
/// </summary>

View File

@ -2,11 +2,19 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Market {
using System.ComponentModel.DataAnnotations;
using Billing;
using Workflow;
public partial class Service : BaseProduct
public class Service : BaseProduct
{
/// <summary>
/// An unique product identifier.
/// </summary>
/// <returns></returns>
[Key(),DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public string ContextId { get; set; }
[ForeignKey("ContextId")]
public virtual Activity Context { get; set; }