Skip to content

Commit

Permalink
Update ReadMe
Browse files Browse the repository at this point in the history
  • Loading branch information
duclvtran committed Apr 26, 2020
1 parent 627267a commit 54d8c18
Show file tree
Hide file tree
Showing 18 changed files with 302 additions and 7 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# ASP.NET 3.1 project from TEDU
# ASP.NET 3.1 project
## Technologies
### Entity Framework Core 3.1
#### ...
- ASP.Net Core 3.1
- Entity Framework Core 3.1
## Install Entity Frameword Core 3.1
Package:
- Microsoft.EntityFrameworkCore.SqlServer
- Microsoft.EntityFrameworkCore.Design
- Microsoft.EntityFrameworkCore.Tools
## Youtube
12 changes: 12 additions & 0 deletions eShopSolution.Data/Entities/AppConfig.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Entities
{
public class AppConfig
{
public string Key { get; set; }
public string Value { get; set; }
}
}
20 changes: 20 additions & 0 deletions eShopSolution.Data/Entities/Cart.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Entities
{
public class Cart
{
public int Id { set; get; }
public int ProductId { set; get; }
public int Quantity { set; get; }
public decimal Price { set; get; }

public Guid UserId { get; set; }

public Product Product { get; set; }

public DateTime DateCreated { get; set; }
}
}
20 changes: 20 additions & 0 deletions eShopSolution.Data/Entities/Category.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using eShopSolution.Data.Enums;
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Entities
{
public class Category
{
public int Id { set; get; }
public int SortOrder { set; get; }
public bool IsShowOnHome { set; get; }
public int? ParentId { set; get; }
public Status Status { set; get; }

public List<ProductInCategory> ProductInCategories { get; set; }

public List<CategoryTranslation> CategoryTranslations { get; set; }
}
}
21 changes: 21 additions & 0 deletions eShopSolution.Data/Entities/CategoryTranslation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Entities
{
public class CategoryTranslation
{
public int Id { set; get; }
public int CategoryId { set; get; }
public string Name { set; get; }
public string SeoDescription { set; get; }
public string SeoTitle { set; get; }
public string LanguageId { set; get; }
public string SeoAlias { set; get; }

public Category Category { get; set; }

public Language Language { get; set; }
}
}
17 changes: 17 additions & 0 deletions eShopSolution.Data/Entities/Contact.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using eShopSolution.Data.Enums;
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Entities
{
public class Contact
{
public int Id { set; get; }
public string Name { set; get; }
public string Email { set; get; }
public string PhoneNumber { set; get; }
public string Message { set; get; }
public Status Status { set; get; }
}
}
19 changes: 19 additions & 0 deletions eShopSolution.Data/Entities/Language.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Entities
{
public class Language
{
public string Id { get; set; }

public string Name { get; set; }

public bool IsDefault { get; set; }

public List<ProductTranslation> ProductTranslations { get; set; }

public List<CategoryTranslation> CategoryTranslations { get; set; }
}
}
20 changes: 20 additions & 0 deletions eShopSolution.Data/Entities/Order.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Entities
{
public class Order
{
public int Id { set; get; }
public DateTime OrderDate { set; get; }
public Guid UserId { set; get; }
public string ShipName { set; get; }
public string ShipAddress { set; get; }
public string ShipEmail { set; get; }
public string ShipPhoneNumber { set; get; }
public OrderStatus Status { set; get; }

public List<OrderDetail> OrderDetails { get; set; }
}
}
18 changes: 18 additions & 0 deletions eShopSolution.Data/Entities/OrderDetail.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Entities
{
public class OrderDetail
{
public int OrderId { set; get; }
public int ProductId { set; get; }
public int Quantity { set; get; }
public decimal Price { set; get; }

public Order Order { get; set; }

public Product Product { get; set; }
}
}
15 changes: 15 additions & 0 deletions eShopSolution.Data/Entities/OrderStatus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Entities
{
public enum OrderStatus
{
InProgress,
Confirmed,
Shipping,
Success,
Canceled
}
}
25 changes: 25 additions & 0 deletions eShopSolution.Data/Entities/Product.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Entities
{
public class Product
{
public int Id { set; get; }
public decimal Price { set; get; }
public decimal OriginalPrice { set; get; }
public int Stock { set; get; }
public int ViewCount { set; get; }
public DateTime DateCreated { set; get; }
public string SeoAlias { set; get; }

public List<ProductInCategory> ProductInCategories { get; set; }

public List<OrderDetail> OrderDetails { get; set; }

public List<Cart> Carts { get; set; }

public List<ProductTranslation> ProductTranslations { get; set; }
}
}
17 changes: 17 additions & 0 deletions eShopSolution.Data/Entities/ProductInCategory.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Entities
{
public class ProductInCategory
{
public int ProductId { get; set; }

public Product Product { get; set; }

public int CategoryId { get; set; }

public Category Category { get; set; }
}
}
24 changes: 24 additions & 0 deletions eShopSolution.Data/Entities/ProductTranslation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Entities
{
public class ProductTranslation
{
public int Id { set; get; }
public int ProductId { set; get; }
public string Name { set; get; }
public string Description { set; get; }
public string Details { set; get; }
public string SeoDescription { set; get; }
public string SeoTitle { set; get; }

public string SeoAlias { get; set; }
public string LanguageId { set; get; }

public Product Product { get; set; }

public Language Language { get; set; }
}
}
21 changes: 21 additions & 0 deletions eShopSolution.Data/Entities/Promotion.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using eShopSolution.Data.Enums;
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Entities
{
public class Promotion
{
public int Id { set; get; }
public DateTime FromDate { set; get; }
public DateTime ToDate { set; get; }
public bool ApplyForAll { set; get; }
public int? DiscountPercent { set; get; }
public decimal? DiscountAmount { set; get; }
public string ProductIds { set; get; }
public string ProductCategoryIds { set; get; }
public Status Status { set; get; }
public string Name { set; get; }
}
}
20 changes: 20 additions & 0 deletions eShopSolution.Data/Entities/Transaction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Transactions;

namespace eShopSolution.Data.Entities
{
public class Transaction
{
public int Id { set; get; }
public DateTime TransactionDate { set; get; }
public string ExternalTransactionId { set; get; }
public decimal Amount { set; get; }
public decimal Fee { set; get; }
public string Result { set; get; }
public string Message { set; get; }
public TransactionStatus Status { set; get; }
public string Provider { set; get; }
}
}
12 changes: 12 additions & 0 deletions eShopSolution.Data/Enums/Status.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Enums
{
public enum Status
{
InActive,
Active
}
}
12 changes: 12 additions & 0 deletions eShopSolution.Data/Enums/TransactionStatus.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;

namespace eShopSolution.Data.Enums
{
public enum TransactionStatus
{
Success,
Failed
}
}
4 changes: 0 additions & 4 deletions eShopSolution.Data/eShopSolution.Data.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,4 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<Folder Include="Entities\" />
</ItemGroup>
</Project>

0 comments on commit 54d8c18

Please sign in to comment.