Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

push feature #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Contracts/RequestModels/Cart/CartDataDetailRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Contracts.ResponseModels.Cart;
using MediatR;

namespace Contracts.RequestModels.Cart
{
public class CartDataDetailRequest : IRequest<CartDataDetailResponse>
{
public Guid CartId { get; set; }
}
}
10 changes: 10 additions & 0 deletions Contracts/RequestModels/Cart/CartDataListRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Contracts.ResponseModels.Cart;
using MediatR;

namespace Contracts.RequestModels.Cart
{
public class CartDataListRequest : IRequest<CartDataListResponse>
{

}
}
12 changes: 12 additions & 0 deletions Contracts/RequestModels/Cart/CreateCartRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using Contracts.ResponseModels.Cart;
using MediatR;

namespace Contracts.RequestModels.Cart
{
public class CreateCartRequest : IRequest<CreateCartResponse>
{
public int Quantity { get; set; }
public Guid ProductId { get; set; }
public Guid Customerid { get; set; }
}
}
18 changes: 18 additions & 0 deletions Contracts/RequestModels/Cart/DeleteCartDataRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using Contracts.ResponseModels.Cart;
using MediatR;

namespace Contracts.RequestModels.Cart
{
public class DeleteCartDataRequest : DeleteCartModel, IRequest<DeleteCartDataResponse>
{
public Guid CartId { get; set; }

}

public class DeleteCartModel
{
public int Quantity { get; set; }
public Guid CustomerId { get; set; }
public Guid ProductId { get; set; }
}
}
17 changes: 17 additions & 0 deletions Contracts/RequestModels/Cart/UpdateCartDataRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Contracts.ResponseModels.Cart;
using MediatR;

namespace Contracts.RequestModels.Cart
{
public class UpdateCartDataRequest : UpdateDataModel, IRequest<UpdateCartDataResponse>
{
public Guid CartId { get; set; }
}

public class UpdateDataModel
{
public int Quantity { get; set; }
public Guid CustomerId { get; set; }
public Guid ProductId { get; set; }
}
}
1 change: 0 additions & 1 deletion Contracts/RequestModels/Customer/CreateCustomerRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ namespace Contracts.RequestModels.Customer
public class CreateCustomerRequest : IRequest<CreateCustomerResponse>
{
public string Name { get; set; } = string.Empty;

public string Email { get; set; } = string.Empty;
}
}
10 changes: 10 additions & 0 deletions Contracts/RequestModels/Customer/CustomerDataDetailRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Contracts.ResponseModels.Customer;
using MediatR;

namespace Contracts.RequestModels.Customer
{
public class CustomerDataDetailRequest : IRequest<CustomerDataDetailResponse>
{
public Guid CustomerId { get; set; }
}
}
7 changes: 4 additions & 3 deletions Contracts/RequestModels/Customer/CustomerDataListRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

namespace Contracts.RequestModels.Customer
{
public class CustomerDataListRequest : IRequest<CustomerDataListResponse>
{
}
public class CustomerDataListRequest : IRequest<CustomerDataListResponse>
{

}
}
16 changes: 16 additions & 0 deletions Contracts/RequestModels/Customer/DeleteCustomerDataRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Contracts.ResponseModels.Customer;
using MediatR;

namespace Contracts.RequestModels.Customer
{
public class DeleteCustomerDataRequest : DeleteCustomerModel, IRequest<DeleteCustomerDataResponse>
{
public Guid? CustomerId { get; set; }
}

public class DeleteCustomerModel
{
public string Name { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
}
}
16 changes: 16 additions & 0 deletions Contracts/RequestModels/Customer/UpdateCustomerDataRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Contracts.ResponseModels.Customer;
using MediatR;

namespace Contracts.RequestModels.Customer
{
public class UpdateCustomerDataRequest : UpdateCustomerDataModel, IRequest<UpdateCustomerDataResponse>
{
public Guid? CustomerId { get; set; }
}

public class UpdateCustomerDataModel
{
public string Name { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
}
}
11 changes: 11 additions & 0 deletions Contracts/RequestModels/Product/CreateProductRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Contracts.ResponseModels.Product;
using MediatR;

namespace Contracts.RequestModels.Product
{
public class CreateProductRequest : IRequest<CreateProductResponse>
{
public string Name { get; set; } = string.Empty;
public decimal Price { get; set; }
}
}
17 changes: 17 additions & 0 deletions Contracts/RequestModels/Product/DeleteProductDataRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using Contracts.ResponseModels.Product;
using MediatR;

namespace Contracts.RequestModels.Product
{
public class DeleteProductDataRequest : DeleteProductModel, IRequest<DeleteProductDataResponse>
{
public Guid? ProductId { get; set; }
}

public class DeleteProductModel
{
public string Name { get; set; } = string.Empty;
public decimal Price { get; set; }
}

}
10 changes: 10 additions & 0 deletions Contracts/RequestModels/Product/ProductDataDetailRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Contracts.ResponseModels.Product;
using MediatR;

namespace Contracts.RequestModels.Product
{
public class ProductDataDetailRequest : IRequest<ProductDataDetailResponse>
{
public Guid ProductId { get; set; }
}
}
9 changes: 9 additions & 0 deletions Contracts/RequestModels/Product/ProductDataListRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Contracts.ResponseModels.Product;
using MediatR;

namespace Contracts.RequestModels.Product
{
public class ProductDataListRequest : IRequest<ProductDataListResponse>
{
}
}
16 changes: 16 additions & 0 deletions Contracts/RequestModels/Product/UpdateProductDataRequest.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
using Contracts.ResponseModels.Product;
using MediatR;

namespace Contracts.RequestModels.Product
{
public class UpdateProductDataRequest : UpdateProductModel, IRequest<UpdateProductDataResponse>
{
public Guid ProductId { get; set; }
}

public class UpdateProductModel
{
public string Name { get; set; } = string.Empty;
public decimal Price { get; set; }
}
}
14 changes: 14 additions & 0 deletions Contracts/ResponseModels/Cart/CartDataDetailResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Contracts.ResponseModels.Cart
{
public class CartDataDetailResponse
{
public Guid CartId { get; set; }
public int Quantity { get; set; }
public Guid ProductId { get; set; }
public Guid CustomerId { get; set; }
public string CustomerName { get; set; } = string.Empty;
public string ProductName { get; set; } = string.Empty;
public decimal Price { get; set; }
public decimal SubTotal { get; set; }
}
}
21 changes: 21 additions & 0 deletions Contracts/ResponseModels/Cart/CartDataListResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using Contracts.ResponseModels.Product;

namespace Contracts.ResponseModels.Cart
{
public class CartDataListResponse
{
public List<CartData> Datas { get; set; } = new List<CartData>();
}

public class CartData
{
public Guid CartId { get; set; }
public int Quantity { get; set; }
public Guid ProductId { get; set; }
public Guid CustomerId { get; set; }
public string CustomerName { get; set; } = string.Empty;
public string ProductName { get; set; } = string.Empty;
public decimal Price { get; set; }
public decimal SubTotal { get; set; }
}
}
7 changes: 7 additions & 0 deletions Contracts/ResponseModels/Cart/CreateCartResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Contracts.ResponseModels.Cart
{
public class CreateCartResponse
{
public Guid CartId { get; set; }
}
}
8 changes: 8 additions & 0 deletions Contracts/ResponseModels/Cart/DeleteCartDataResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Contracts.ResponseModels.Cart
{
public class DeleteCartDataResponse
{
public bool Success { get; set; }
public string Message { get; set; } = string.Empty;
}
}
8 changes: 8 additions & 0 deletions Contracts/ResponseModels/Cart/UpdateCartDataResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Contracts.ResponseModels.Cart
{
public class UpdateCartDataResponse
{
public bool Success { get; set; }
public string Message { get; set; } = string.Empty;
}
}
9 changes: 5 additions & 4 deletions Contracts/ResponseModels/Customer/CreateCustomerResponse.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
namespace Contracts.ResponseModels.Customer
{
public class CreateCustomerResponse
{
public Guid CustomerID { get; set; }
}
public class CreateCustomerResponse
{
public Guid CustomerId { get; set; }

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Contracts.ResponseModels.Customer
{
public class CustomerDataDetailResponse
{
public Guid CustomerId { get; set; }
public string Name { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
}
}
22 changes: 10 additions & 12 deletions Contracts/ResponseModels/Customer/CustomerDataListResponse.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
namespace Contracts.ResponseModels.Customer
{
public class CustomerDataListResponse
{
public List<CustomerData> CustomerDatas { get; set;} = new List<CustomerData>();
}
public class CustomerDataListResponse
{
public List<CustomerData> CustomerData { get; set; } = new List<CustomerData>();
}

public class CustomerData
{
public Guid CustomerID { get; set; }

public string Name { get; set; } = string.Empty;

public string Email { get; set; } = string.Empty;
}
public class CustomerData
{
public Guid CustomerId { get; set; }
public string Name { get; set; } = string.Empty;
public string Email { get; set; } = string.Empty;
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Contracts.ResponseModels.Customer
{
public class DeleteCustomerDataResponse
{
public bool Sucess { get; set; }
public string Message { get; set; } = string.Empty;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Contracts.ResponseModels.Customer
{
public class UpdateCustomerDataResponse
{
public bool Success { get; set; }
public string Message { get; set; } = string.Empty;
}
}
7 changes: 7 additions & 0 deletions Contracts/ResponseModels/Product/CreateProductResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Contracts.ResponseModels.Product
{
public class CreateProductResponse
{
public Guid ProductId { get; set; }
}
}
8 changes: 8 additions & 0 deletions Contracts/ResponseModels/Product/DeleteProductDataResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Contracts.ResponseModels.Product
{
public class DeleteProductDataResponse
{
public bool Success { get; set; }
public string Message { get; set; } = string.Empty;
}
}
9 changes: 9 additions & 0 deletions Contracts/ResponseModels/Product/ProductDataDetailResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Contracts.ResponseModels.Product
{
public class ProductDataDetailResponse
{
public Guid ProductId { get; set; }
public string Name { get; set; } = string.Empty;
public decimal Price { get; set; }
}
}
13 changes: 13 additions & 0 deletions Contracts/ResponseModels/Product/ProductDataListResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Contracts.ResponseModels.Product
{
public class ProductDataListResponse
{
public List<ProductData> datas { get; set; } = new List<ProductData>();
}
public class ProductData
{
public Guid ProductId { get; set; }
public string Name { get; set; } = string.Empty;
public decimal Price { get; set; }
}
}
8 changes: 8 additions & 0 deletions Contracts/ResponseModels/Product/UpdateProductDataResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Contracts.ResponseModels.Product
{
public class UpdateProductDataResponse
{
public bool Success { get; set; }
public string Message { get; set; } = string.Empty;
}
}
Loading