Ajout du Modèle du sujet 1
This commit is contained in:
15
PyroFetes/Models/ProductEffect.cs
Normal file
15
PyroFetes/Models/ProductEffect.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace API.Models;
|
||||
|
||||
[PrimaryKey(nameof(ProductId), nameof(EffectId))]
|
||||
public class ProductEffect
|
||||
{
|
||||
public Product? Product { get; set; }
|
||||
[Required] public int ProductId { get; set; }
|
||||
|
||||
public Effect? Effect { get; set; }
|
||||
[Required] public int EffectId { get; set; }
|
||||
|
||||
}
|
Reference in New Issue
Block a user