26 lines
653 B
C#
26 lines
653 B
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Webshop.Domain.Entities
|
|
{
|
|
public class CartItem
|
|
{
|
|
[Key]
|
|
public Guid Id { get; set; }
|
|
|
|
public Guid CartId { get; set; }
|
|
|
|
[ForeignKey("CartId")]
|
|
public virtual Cart Cart { get; set; } = default!;
|
|
|
|
public Guid ProductId { get; set; }
|
|
|
|
[ForeignKey("ProductId")]
|
|
public virtual Product Product { get; set; } = default!;
|
|
|
|
public Guid? ProductVariantId { get; set; } // Optional, falls du Varianten nutzt
|
|
|
|
public int Quantity { get; set; }
|
|
}
|
|
} |