migration
This commit is contained in:
26
Webshop.Domain/Entities/CartItem.cs
Normal file
26
Webshop.Domain/Entities/CartItem.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user