image änderungen
This commit is contained in:
26
Webshop.Domain/Entities/ProductImage.cs
Normal file
26
Webshop.Domain/Entities/ProductImage.cs
Normal 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!;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user