This commit is contained in:
Tizian.Breuch
2025-09-08 11:24:10 +02:00
parent 471f4a2e7a
commit 5b84ccc575
15 changed files with 352 additions and 63 deletions

View File

@@ -1,16 +1,23 @@
// Auto-generiert von CreateWebshopFiles.ps1
// src/Webshop.Application/DTOs/Reviews/CreateReviewDto.cs
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
namespace Webshop.Application.DTOs.Reviews
{
public class CreateReviewDto
{
[Required]
public Guid ProductId { get; set; }
[Required]
[Range(1, 5)]
public int Rating { get; set; }
public string? Title { get; set; }
public string Comment { get; set; } = string.Empty;
[Required]
[MaxLength(255)]
public string Title { get; set; } = string.Empty;
[MaxLength(2000)]
public string? Comment { get; set; }
}
}
}

View File

@@ -1,8 +1,5 @@
// Auto-generiert von CreateWebshopFiles.ps1
// src/Webshop.Application/DTOs/Reviews/ReviewDto.cs
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Webshop.Application.DTOs.Reviews
{
@@ -10,11 +7,12 @@ namespace Webshop.Application.DTOs.Reviews
{
public Guid Id { get; set; }
public Guid ProductId { get; set; }
public Guid? CustomerId { get; set; }
public string? ProductName { get; set; } // F<>r Admin-Ansicht
public string CustomerName { get; set; } = string.Empty;
public int Rating { get; set; }
public string? Title { get; set; }
public string Comment { get; set; } = string.Empty;
public string Title { get; set; } = string.Empty;
public string? Comment { get; set; }
public DateTimeOffset ReviewDate { get; set; }
public bool IsApproved { get; set; }
}
}
}