23 lines
619 B
C#
23 lines
619 B
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace Webshop.Domain.Entities;
|
|
|
|
/// <summary>
|
|
/// Verknüpfungstabelle für die Viele-zu-Viele-Beziehung zwischen Category und Discount.
|
|
/// </summary>
|
|
public class CategoryDiscount
|
|
{
|
|
[Required]
|
|
[ForeignKey(nameof(Category))]
|
|
public Guid CategoryId { get; set; }
|
|
|
|
[Required]
|
|
[ForeignKey(nameof(Discount))]
|
|
public Guid DiscountId { get; set; }
|
|
|
|
// Navigation Properties
|
|
public virtual Category Category { get; set; }
|
|
public virtual Discount Discount { get; set; }
|
|
} |