// src/Webshop.Domain/Entities/Customer.cs using System; using System.ComponentModel.DataAnnotations; using System.Collections.Generic; using Webshop.Domain.Identity; // Für ApplicationUser namespace Webshop.Domain.Entities { public class Customer { [Key] public Guid Id { get; set; } = Guid.NewGuid(); // Default-Wert setzen [Required] public string AspNetUserId { get; set; } // Fremdschlüssel zu ApplicationUser.Id [Required] [MaxLength(100)] public string FirstName { get; set; } = string.Empty; [Required] [MaxLength(100)] public string LastName { get; set; } = string.Empty; // << ENTFERNT: Email ist auf ApplicationUser >> // << ENTFERNT: PhoneNumber ist auf ApplicationUser >> // << ENTFERNT: CreatedDate ist auf ApplicationUser >> public Guid? DefaultShippingAddressId { get; set; } // Fremdschlüssel zur Standardversandadresse public Guid? DefaultBillingAddressId { get; set; } // Fremdschlüssel zur Standardrechnungsadresse // Navigation Property zum ApplicationUser public virtual ApplicationUser User { get; set; } = default!; // Muss auf ApplicationUser verweisen // Navigation Properties zu Collections public virtual ICollection
Addresses { get; set; } = new List(); public virtual ICollection