-
Notifications
You must be signed in to change notification settings - Fork 3.1k
/
Product.cs
60 lines (44 loc) · 1.65 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
58
59
60
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Microsoft.EntityFrameworkCore.SqlAzure.Model;
[Table("Product", Schema = "SalesLT")]
public class Product
{
public Product()
{
OrderDetails = new HashSet<SalesOrderDetail>();
}
public int ProductID { get; set; }
[Required]
public string Name { get; set; }
[MaxLength(15)]
public string Color { get; set; }
public DateTime? DiscontinuedDate { get; set; }
public decimal ListPrice { get; set; }
public DateTime ModifiedDate { get; set; }
public int? ProductCategoryID { get; set; }
public int? ProductModelID { get; set; }
[Required]
[MaxLength(25)]
public string ProductNumber { get; set; }
public DateTime? SellEndDate { get; set; }
public DateTime SellStartDate { get; set; }
[MaxLength(5)]
public string Size { get; set; }
public decimal StandardCost { get; set; }
public byte[] ThumbNailPhoto { get; set; }
[MaxLength(50)]
public string ThumbnailPhotoFileName { get; set; }
public decimal? Weight { get; set; }
public Guid rowguid { get; set; }
[InverseProperty("Product")]
public virtual ICollection<SalesOrderDetail> OrderDetails { get; set; }
[ForeignKey("ProductCategoryID")]
[InverseProperty("Product")]
public virtual ProductCategory ProductCategory { get; set; }
[ForeignKey("ProductModelID")]
[InverseProperty("Product")]
public virtual ProductModel ProductModel { get; set; }
}