Entité du sujet 3 avec connections et cardinalités

This commit is contained in:
2025-10-02 14:53:55 +02:00
parent d3a8ae593e
commit 21d3480b19
6 changed files with 139 additions and 0 deletions

22
PyroFetes/Models/Staff.cs Normal file
View File

@@ -0,0 +1,22 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
public class Staff
{
[Key] public int Id { get; set; }
[Required, MaxLength(60)]
public string FirstName { get; set; } = null!;
[Required, MaxLength(60)]
public string LastName { get; set; } = null!;
[MaxLength(100)]
public string? Profession { get; set; }
[EmailAddress, MaxLength(120)]
public string? Email { get; set; }
public ICollection<Show> Shows { get; set; } = new List<Show>();
}