added a new field to the Product entity and to Dtos

This commit is contained in:
stasex 2023-11-08 14:29:40 +02:00
parent d3dd06fb58
commit 58ae7af0fa
4 changed files with 7 additions and 0 deletions

View File

@ -9,6 +9,8 @@ public class ProductCreateDto
public required string Description { get; set; } public required string Description { get; set; }
public required double Rating { get; set; } public required double Rating { get; set; }
public required double Price { get; set; }
public required string[] ImagesUrls { get; set; } public required string[] ImagesUrls { get; set; }

View File

@ -12,6 +12,8 @@ public class ProductDto
public required double Rating { get; set; } public required double Rating { get; set; }
public required double Price { get; set; }
public required string[] ImagesUrls { get; set; } public required string[] ImagesUrls { get; set; }
public required bool WasOpened { get; set; } public required bool WasOpened { get; set; }

View File

@ -17,6 +17,8 @@ public class Product : EntityBase
public string[] ImagesUrls { get; set; } public string[] ImagesUrls { get; set; }
public bool WasOpened { get; set; } public bool WasOpened { get; set; }
public double Price { get; set; }
public ObjectId WishlistId { get; set; } public ObjectId WishlistId { get; set; }
} }

View File

@ -152,6 +152,7 @@ public class ProductService : IProductService
Name = productBuffer.Name, Name = productBuffer.Name,
Rating = 0, Rating = 0,
Description = "", Description = "",
Price = 0,
ImagesUrls = new []{"", ""}, ImagesUrls = new []{"", ""},
WasOpened = false WasOpened = false
}, cancellationToken); }, cancellationToken);