Upload project.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
namespace ThAmCo.Products.Models.DTOs
|
||||
{
|
||||
public class FromSingleStockDTO
|
||||
{
|
||||
public int ProductID { get; set; }
|
||||
public int Stock { get; set; }
|
||||
public double Price { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ThAmCo.Products.Models.DTOs
|
||||
{
|
||||
public class MultipleStockDTO
|
||||
{
|
||||
public ProductStockDTO ProductStock { get; set; }
|
||||
public PriceDTO Price { get; set; }
|
||||
}
|
||||
}
|
||||
12
ThAmCo-Products/ThAmCo.Products/Models/DTOs/PriceDTO.cs
Normal file
12
ThAmCo-Products/ThAmCo.Products/Models/DTOs/PriceDTO.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace ThAmCo.Products.Models.DTOs
|
||||
{
|
||||
public class PriceDTO
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ProductStockId { get; set; }
|
||||
public double ProductPrice { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace ThAmCo.Products.Models.DTOs
|
||||
{
|
||||
public class ProductStockDTO
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ProductId { get; set; }
|
||||
public int Stock { get; set; }
|
||||
public int PriceId { get; set; }
|
||||
}
|
||||
}
|
||||
16
ThAmCo-Products/ThAmCo.Products/Models/DTOs/ReviewDto.cs
Normal file
16
ThAmCo-Products/ThAmCo.Products/Models/DTOs/ReviewDto.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ThAmCo.Products.Models.DTOs
|
||||
{
|
||||
public class ReviewDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int PurchaseId { get; set; }
|
||||
public bool IsVisible { get; set; }
|
||||
public int Rating { get; set; }
|
||||
public string Content { get; set; }
|
||||
}
|
||||
}
|
||||
11
ThAmCo-Products/ThAmCo.Products/Models/ErrorViewModel.cs
Normal file
11
ThAmCo-Products/ThAmCo.Products/Models/ErrorViewModel.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace ThAmCo.Products.Models
|
||||
{
|
||||
public class ErrorViewModel
|
||||
{
|
||||
public string RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
}
|
||||
}
|
||||
15
ThAmCo-Products/ThAmCo.Products/Models/LoginModel.cs
Normal file
15
ThAmCo-Products/ThAmCo.Products/Models/LoginModel.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace ThAmCo.Products.Models
|
||||
{
|
||||
public class LoginModel
|
||||
{
|
||||
//[Required, EmailAddress]
|
||||
public string Email { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using ThAmCo.Products.Data;
|
||||
using ThAmCo.Products.Models.DTOs;
|
||||
|
||||
namespace ThAmCo.Products.Models.ViewModels
|
||||
{
|
||||
public class DetailsWithReviewsModelcs
|
||||
{
|
||||
public Product Product { get; set; }
|
||||
public List<ReviewDto> Reviews { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ThAmCo.Products.Models.ViewModels
|
||||
{
|
||||
public class ProductsIndexModel
|
||||
{
|
||||
public IEnumerable<ProductsPriceStockModel> Products { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public int? BrandId { get; set; }
|
||||
public int? CategoryId { get; set; }
|
||||
public double? PriceLow { get; set; }
|
||||
public double? PriceHigh { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
using ThAmCo.Products.Data;
|
||||
|
||||
namespace ThAmCo.Products.Models.ViewModels
|
||||
{
|
||||
public class ProductsPriceStockModel
|
||||
{
|
||||
public Product Product { get; set; }
|
||||
public int? Stock { get; set; }
|
||||
public double? Price { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user