Ajout des Key et Required

This commit is contained in:
reignem
2025-10-02 14:43:34 +02:00
parent 423f4c4a6c
commit 964faa0b6b
14 changed files with 95 additions and 85 deletions

View File

@@ -1,11 +1,12 @@
using API.Class;
using System.ComponentModel.DataAnnotations;
using API.Class;
namespace API.Models;
public class ProductCategory
{
public int Id { get; set; }
public string Label { get; set; }
[Key] public int Id { get; set; }
[Required] public string Label { get; set; }
public List<Product> Products { get; set; }
[Required] public List<Product> Products { get; set; }
}