-
Notifications
You must be signed in to change notification settings - Fork 2
/
Product.cs
57 lines (43 loc) · 1.6 KB
/
Product.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
namespace Common.Entities
{
public sealed class Product
{
public int seller_id { get; set; }
public int product_id { get; set; }
public string name { get; set; } = "";
public string sku { get; set; } = "";
public string category { get; set; } = "";
public string description { get; set; } = "";
public float price { get; set; }
public float freight_value { get; set; }
public string status { get; set; } = "approved";
public string version { get; set; }
public Product() { }
public Product(Product product, string version)
{
this.seller_id = product.seller_id;
this.product_id = product.product_id;
this.name = product.name;
this.sku = product.sku;
this.category = product.category;
this.description = product.description;
this.price = product.price;
this.freight_value = product.freight_value;
this.status = product.status;
this.version = version;
}
public Product(Product product, float newPrice)
{
this.seller_id = product.seller_id;
this.product_id = product.product_id;
this.name = product.name;
this.sku = product.sku;
this.category = product.category;
this.description = product.description;
this.price = newPrice;
this.freight_value = product.freight_value;
this.status = product.status;
this.version = product.version;
}
}
}