image änderungen

This commit is contained in:
Tizian.Breuch
2025-08-06 10:42:32 +02:00
parent 2475e896b9
commit 7ff593cfcf
16 changed files with 427 additions and 172 deletions

View File

@@ -0,0 +1,26 @@
// src/Webshop.Domain/Entities/ProductImage.cs
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Webshop.Domain.Entities
{
public class ProductImage
{
[Key]
public Guid Id { get; set; } = Guid.NewGuid();
[Required]
public string Url { get; set; } = string.Empty;
public bool IsMainImage { get; set; } = false;
public int DisplayOrder { get; set; } = 0;
[Required]
[ForeignKey(nameof(Product))]
public Guid ProductId { get; set; }
public virtual Product Product { get; set; } = default!;
}
}