using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace Webshop.Domain.Entities { public class Cart { [Key] public Guid Id { get; set; } // Verknüpfung zum User (String, da Identity User Id ein String ist) public string? UserId { get; set; } // Falls du auch Gast-Warenkörbe ohne Login unterstützt: public string? SessionId { get; set; } public DateTime LastModified { get; set; } = DateTime.UtcNow; public virtual ICollection Items { get; set; } = new List(); } }