refactoring
This commit is contained in:
@ -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.
|
||||
|
@ -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>
|
||||
|
@ -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; }
|
||||
|
Reference in New Issue
Block a user