test bilder erneut

This commit is contained in:
Tizian.Breuch
2025-08-08 15:50:01 +02:00
parent 562d720c4a
commit c2af53c5ce
7 changed files with 65 additions and 69 deletions

View File

@@ -1,5 +1,4 @@
// src/Webshop.Application/DTOs/Products/CreateAdminProductDto.cs
using Microsoft.AspNetCore.Http; // Für IFormFile
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
@@ -21,13 +20,12 @@ namespace Webshop.Application.DTOs.Products
[Required]
public string Slug { get; set; }
// << NEU: Felder für den Bildupload >>
public IFormFile? MainImageFile { get; set; }
public List<IFormFile>? AdditionalImageFiles { get; set; }
// << KORREKTUR: Felder für Bild-URLs, keine IFormFile >>
public string? MainImageUrl { get; set; }
public List<string>? AdditionalImageUrls { get; set; }
public List<Guid> CategorieIds { get; set; } = new List<Guid>();
// ... weitere Felder, die beim Erstellen benötigt werden (z.B. SupplierId, PurchasePrice etc.) ...
public decimal? Weight { get; set; }
public decimal? OldPrice { get; set; }
public Guid? SupplierId { get; set; }

View File

@@ -10,4 +10,4 @@ namespace Webshop.Application.DTOs.Products
public bool IsMainImage { get; set; }
public int DisplayOrder { get; set; }
}
}
}

View File

@@ -1,5 +1,4 @@
// src/Webshop.Application/DTOs/Products/UpdateAdminProductDto.cs
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
@@ -23,14 +22,12 @@ namespace Webshop.Application.DTOs.Products
[Required]
public string Slug { get; set; }
// << NEU: Felder für den Bildupload und -verwaltung >>
public IFormFile? MainImageFile { get; set; } // Optional: Neues Hauptbild hochladen
public List<IFormFile>? AdditionalImageFiles { get; set; } // Optional: Weitere Bilder hochladen
public List<Guid>? ImagesToDelete { get; set; } // Liste der IDs von Bildern, die gelöscht werden sollen
// << KORREKTUR: Felder für Bild-URLs >>
public string? MainImageUrl { get; set; }
public List<string>? AdditionalImageUrls { get; set; }
public List<Guid> CategorieIds { get; set; } = new List<Guid>();
// ... weitere Felder, die beim Aktualisieren benötigt werden ...
public decimal? Weight { get; set; }
public decimal? OldPrice { get; set; }
public Guid? SupplierId { get; set; }