Projektdateien hinzufügen.
This commit is contained in:
23
Webshop.Domain/Entities/CategoryDiscount.cs
Normal file
23
Webshop.Domain/Entities/CategoryDiscount.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user