-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Aggregator] Added Dto Model Class for Api Aggreation Operations
- Loading branch information
1 parent
f7709c9
commit 203e6b4
Showing
4 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
src/ApiGateways/Shopping.Aggregator/Models/BasketItemExtendedModel.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
namespace Shopping.Aggregator.Models; | ||
/// <summary> | ||
/// It is the DTO of the Basket.API -> Entities -> ShoppingCartItem | ||
/// </summary> | ||
public class BasketItemExtendedModel | ||
{ | ||
public int Quantity { get; set; } | ||
public string Color { get; set; } | ||
public decimal Price { get; set; } | ||
public string ProductId { get; set; } | ||
public string ProductName { get; set; } | ||
|
||
// Product Related Additional Fields -> these info will be retrieved from mongoDB by using productId | ||
public string Category { get; set; } | ||
public string Summary { get; set; } | ||
public string Description { get; set; } | ||
public string ImageFile { get; set; } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Shopping.Aggregator.Models; | ||
/// <summary> | ||
/// It is the DTO of the Basket.API -> Entities -> ShoppingCart | ||
/// </summary> | ||
public class BasketModel | ||
{ | ||
public string UserName { get; set; } | ||
public List<BasketItemExtendedModel> Items { get; set; } = new List<BasketItemExtendedModel>(); | ||
public decimal TotalPrice { get; set; } | ||
} |
14 changes: 14 additions & 0 deletions
14
src/ApiGateways/Shopping.Aggregator/Models/CatalogModel.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
namespace Shopping.Aggregator.Models; | ||
/// <summary> | ||
/// It is the DTO of the Catalog.API -> Entities -> Product | ||
/// </summary> | ||
public class CatalogModel | ||
{ | ||
public string Id { get; set; } | ||
public string Name { get; set; } | ||
public string Category { get; set; } | ||
public string Summary { get; set; } | ||
public string Description { get; set; } | ||
public string ImageFile { get; set; } | ||
public decimal Price { get; set; } | ||
} |
25 changes: 25 additions & 0 deletions
25
src/ApiGateways/Shopping.Aggregator/Models/OrderResponse.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
namespace Shopping.Aggregator.Models; | ||
/// <summary> | ||
/// It is the DTO of the Ordering.Domain -> Entities -> Order | ||
/// </summary> | ||
public class OrderResponse | ||
{ | ||
public string UserName { get; set; } | ||
public decimal TotalPrice { get; set; } | ||
|
||
// BillingAddress | ||
public string FirstName { get; set; } | ||
public string LastName { get; set; } | ||
public string EmailAddress { get; set; } | ||
public string AddressLine { get; set; } | ||
public string Country { get; set; } | ||
public string? State { get; set; } | ||
public string? ZipCode { get; set; } | ||
|
||
// Payment | ||
public string? CardName { get; set; } | ||
public string? CardNumber { get; set; } | ||
public string? Expiration { get; set; } | ||
public string? CVV { get; set; } | ||
public int PaymentMethod { get; set; } | ||
} |