测试
This commit is contained in:
9
MinimalAPI/Models/DTOs/CategoryDto.cs
Normal file
9
MinimalAPI/Models/DTOs/CategoryDto.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace HardwarePerformance.Models.DTOs
|
||||
{
|
||||
public class CategoryDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Description { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
11
MinimalAPI/Models/DTOs/PagedResultDto.cs
Normal file
11
MinimalAPI/Models/DTOs/PagedResultDto.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace HardwarePerformance.Models.DTOs
|
||||
{
|
||||
public class PagedResultDto<T>
|
||||
{
|
||||
public List<T> Items { get; set; } = new();
|
||||
public int Total { get; set; }
|
||||
public int CurrentPage { get; set; }
|
||||
public int PageSize { get; set; }
|
||||
public int TotalPages { get; set; }
|
||||
}
|
||||
}
|
||||
20
MinimalAPI/Models/DTOs/ProductDto.cs
Normal file
20
MinimalAPI/Models/DTOs/ProductDto.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace HardwarePerformance.Models.DTOs
|
||||
{
|
||||
public class ProductDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Model { get; set; } = string.Empty;
|
||||
public string Manufacturer { get; set; } = string.Empty;
|
||||
public int CategoryId { get; set; }
|
||||
public int CurrentRank { get; set; }
|
||||
public DateTime ReleaseDate { get; set; }
|
||||
public decimal? Price { get; set; }
|
||||
public int? PerformanceScore { get; set; }
|
||||
public CategoryDto? Category { get; set; }
|
||||
public List<PerformanceScore> PerformanceScores { get; set; } = new();
|
||||
public List<Specification> Specifications { get; set; } = new();
|
||||
}
|
||||
}
|
||||
15
MinimalAPI/Models/DTOs/ProductListDto.cs
Normal file
15
MinimalAPI/Models/DTOs/ProductListDto.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace HardwarePerformance.Models.DTOs
|
||||
{
|
||||
public class ProductListDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string Model { get; set; } = string.Empty;
|
||||
public string Manufacturer { get; set; } = string.Empty;
|
||||
public int CategoryId { get; set; }
|
||||
public int CurrentRank { get; set; }
|
||||
public DateTime ReleaseDate { get; set; }
|
||||
public decimal? Price { get; set; }
|
||||
public int? PerformanceScore { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user