Created
October 31, 2017 13:23
-
-
Save rmaziarka/480b3fecfb5871a91a0e9fd9b076fd7d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Product | |
{ | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public decimal Price { get; set; } | |
public DateTime CreationDate { get; set; } | |
public int CategoryId { get; set; } | |
public Category Category { get; set; } | |
public virtual ICollection<FieldValue> FieldValues { get; set; } | |
public int ManufacturerId { get; set; } | |
public Manufacturer Manufacturer { get; set; } | |
public virtual ICollection<Discount> Discounts { get; set; } | |
public virtual ICollection<RelatedProduct> RelatedProducts { get; set; } | |
public virtual ICollection<Review> Reviews { get; set; } | |
public virtual ICollection<ProductPicture> Pictures { get; set; } | |
public virtual ICollection<OrderItem> OrderItems { get; set; } | |
public virtual ICollection<RelatedProduct> ProductsRelatedTo { get; set; } | |
public ICollection<Discount> DiscountsRelatedTo { get; set; } | |
} | |
public class Picture | |
{ | |
public int Id { get; set; } | |
public string Url { get; set; } | |
} | |
public class ProductPicture | |
{ | |
public int Id { get; set; } | |
public int ProductId { get; set; } | |
public Product Product { get; set; } | |
public int PictureId { get; set; } | |
public Picture Picture { get; set; } | |
public bool IsMain { get; set; } | |
} | |
public class OrderItem | |
{ | |
public int Id { get; set; } | |
public int ProductId { get; set; } | |
public Product Product { get; set; } | |
public int OrderId { get; set; } | |
public Order Order { get; set; } | |
} | |
public class Order | |
{ | |
public int Id { get; set; } | |
public virtual IEnumerable<OrderItem> OrderItems { get; set; } | |
} | |
public class Manufacturer | |
{ | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public Picture Picture { get; set; } | |
public int PictureId { get; set; } | |
} | |
public class Review | |
{ | |
public int Id { get; set; } | |
public int UserId { get; set; } | |
public User User { get; set; } | |
public float Rating { get; set; } | |
public DateTime CreateDate { get; set; } | |
public int ProductId { get; set; } | |
public Product Product { get; set; } | |
} | |
public class User | |
{ | |
public int Id { get; set; } | |
public string Name { get; set; } | |
} | |
public class RelatedProduct | |
{ | |
public int Id { get; set; } | |
public int MainProductId { get; set; } | |
public Product MainProduct { get; set; } | |
public int ProductId { get; set; } | |
public Product Product { get; set; } | |
} | |
public class Discount | |
{ | |
public int Id { get; set; } | |
public int MainProductId { get; set; } | |
public Product MainProduct { get; set; } | |
public int ProductId { get; set; } | |
public Product Product { get; set; } | |
public float Value { get; set; } | |
} | |
public class Field | |
{ | |
public int Id { get; set; } | |
public string Name { get; set; } | |
public int CategoryId { get; set; } | |
public Category Category { get; set; } | |
public string Type { get; set; } | |
} | |
public class FieldValue | |
{ | |
public int Id { get; set; } | |
public int FieldId { get; set; } | |
public Field Field { get; set; } | |
public int ProductId { get; set; } | |
public Product Product { get; set; } | |
public int? IntegerValue { get; set; } | |
public string StringValue { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment