Advertisement
Guest User

Entities 4 dimas

a guest
Mar 23rd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.63 KB | None | 0 0
  1.  public class BaseEntity {
  2.         [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  3.         public long Id { get; set; }
  4.  
  5.         public DateTime UpdatedDate { get; set; }
  6.  
  7.         public DateTime CreatedDate { get; set; }
  8.     }
  9.  
  10.    public class Category : BaseEntity {
  11.         public string Name { get; set; }
  12.  
  13.         [ForeignKey("Parent")]
  14.         public long? ParentId { get; set; }
  15.         public Category Parent { get; set; }
  16.  
  17.         public List<Category> SubCategory { get; set; }
  18.  
  19.         public List<Product> Products { get; set; }
  20.  
  21.         public string Comment { get; set; }
  22.  
  23.         public bool isRemoved { get; set; }
  24.  
  25.         public int Priority { get; set; }
  26.     }
  27.  
  28.  public class Product : BaseEntity {
  29.         public string Name { get; set; }
  30.  
  31.         public string ProductCode { get; set; }
  32.  
  33.         public long SubCategoryId { get; set; }
  34.  
  35.         public decimal Price { get; set; }
  36.  
  37.         public int Quantity { get; set; }
  38.  
  39.         public string ReturnedDesigns { get; set; }
  40.  
  41.         public bool IsRemoved { get; set; }
  42.  
  43.         public long CategoryId { get; set; }
  44.         public Category Category { get; set; }
  45.  
  46.         public long LexiconId { get; set; }
  47.         public Lexicon Lexicon { get; set; }
  48.  
  49.         public string ProductPromId { get; set; }
  50.  
  51.         public decimal PurchasePrice { get; set; }
  52.  
  53.         public decimal PartnerPrice { get; set; }
  54.  
  55.         public decimal RecomendedPartnerPrice { get; set; }
  56.  
  57.         public string PartnerProductCode { get; set; }
  58.  
  59.         public string ProductFoto { get; set; }
  60.  
  61.         [NotMapped]
  62.         public int WaitingQuantity { get; set; }
  63.  
  64.     }
  65.  
  66. public class Lexicon : BaseEntity {
  67.         public string OfficialName { get; set; }
  68.  
  69.         public string PurchaseName { get; set; }
  70.  
  71.         public string CasualName { get; set; }
  72.  
  73.         public string VendorName { get; set; }
  74.  
  75.         public decimal VendorPrice { get; set; }
  76.  
  77.         public int DesignsQuantity { get; set; }
  78.  
  79.         public long ProductTypeId { get; set; }
  80.         public ProductType ProductType { get; set; }
  81.  
  82.         public bool HasColors { get; set; }
  83.  
  84.         public bool HasDesigns { get; set; }
  85.  
  86.         public bool HasComment { get; set; }
  87.  
  88.         public bool HasQuantity { get; set; }
  89.        
  90.         public bool CanBeBase { get; set; }
  91.  
  92.         public bool CanHaveUserImg { get; set; }
  93.  
  94.         public int Priority { get; set; }
  95.  
  96.         public bool IsForPartners { get; set; }
  97.  
  98.         public string OfficialPartnerName { get; set; }
  99.  
  100.         public int PartnerPriority { get; set; }
  101.  
  102.         public bool IsRemoved { get; set; }
  103.  
  104.     }
  105.  
  106.  public class ProductType : BaseEntity{
  107.         public string Name { get; set; }
  108.     }
  109.  
  110.  public class ProductColor : BaseEntity {
  111.         public long ProductId { get; set; }
  112.         public Product Product { get; set; }
  113.  
  114.         public long ColorId { get; set; }
  115.         public Color Color { get; set; }
  116.  
  117.         public int Quantity { get; set; }
  118.  
  119.         public DateTime ShipmentDate { get; set; }
  120.  
  121.         public string PictureUrl1 { get; set; }
  122.         public string PictureUrl2 { get; set; }
  123.         public string PictureUrl3 { get; set; }
  124.         public string PictureUrl4 { get; set; }
  125.         public string PictureUrl5 { get; set; }
  126.  
  127.         public bool isRemoved { get; set; }
  128.  
  129.         [NotMapped]
  130.         public int WaitingQuantity { get; set; }
  131.     }
  132.  
  133.   public class Color : BaseEntity {
  134.         public string Name { get; set; }
  135.    
  136.         public string Code { get; set; }
  137.  
  138.         public int Priority { get; set; }
  139.  
  140.         public bool IsRemoved { get; set; }
  141.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement