diff --git a/PyroFetes/Models/Show.cs b/PyroFetes/Models/Show.cs new file mode 100644 index 0000000..5d4e794 --- /dev/null +++ b/PyroFetes/Models/Show.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations; + +namespace PyroFetes.Models; + +public class Show +{ + [Key] public int Id { get; set; } + + [MaxLength(120)] + public string? Place { get; set; } + + [MaxLength(500)] + public string? Description { get; set; } + + // Lien (chemin/URL/nom de fichier) vers le plan d’implémentation pyrotechnique + [MaxLength(500)] + public string? PyrotechnicImplementationPlan { get; set; } + + public DateTime? Date { get; set; } + + public ICollection Staff { get; set; } = new List(); + public ICollection Trucks { get; set; } = new List(); + public ICollection SoundCues { get; set; } = new List(); +} \ No newline at end of file diff --git a/PyroFetes/Models/Sound.cs b/PyroFetes/Models/Sound.cs new file mode 100644 index 0000000..4bde6bf --- /dev/null +++ b/PyroFetes/Models/Sound.cs @@ -0,0 +1,34 @@ +using System.ComponentModel.DataAnnotations; + +namespace PyroFetes.Models; + +public class Sound +{ + [Key] public int Id { get; set; } + + [Required, MaxLength(120)] + public string Name { get; set; } = null!; + + [MaxLength(60)] + public string? Type { get; set; } + + [MaxLength(120)] + public string? Artist { get; set; } + + [Range(0, int.MaxValue)] + public int? Duration { get; set; } + + [MaxLength(40)] + public string? Kind { get; set; } + + [MaxLength(40)] + public string? Format { get; set; } + + public DateTime? CreationDate { get; set; } + + [Required] + public int SoundCategoryId { get; set; } + public SoundCategory? Category { get; set; } + + public ICollection ShowPlacements { get; set; } = new List(); +} \ No newline at end of file diff --git a/PyroFetes/Models/SoundCategory.cs b/PyroFetes/Models/SoundCategory.cs new file mode 100644 index 0000000..17b5120 --- /dev/null +++ b/PyroFetes/Models/SoundCategory.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations; + +namespace PyroFetes.Models; + +public class SoundCategory +{ + [Key] public int Id { get; set; } + + [Required, MaxLength(60)] + public string Name { get; set; } = null!; + + public ICollection Sounds { get; set; } = new List(); +} \ No newline at end of file diff --git a/PyroFetes/Models/SoundTimecode.cs b/PyroFetes/Models/SoundTimecode.cs new file mode 100644 index 0000000..0492073 --- /dev/null +++ b/PyroFetes/Models/SoundTimecode.cs @@ -0,0 +1,22 @@ +using System.ComponentModel.DataAnnotations; + +namespace PyroFetes.Models; + +public class SoundTimecode +{ + [Key] public int Id { get; set; } + + [Required] + public int ShowId { get; set; } + public Show? Show { get; set; } + + [Required] + public int SoundId { get; set; } + public Sound? Sound { get; set; } + + [Required, Range(0, int.MaxValue)] + public int Start { get; set; } + + [Required, Range(0, int.MaxValue)] + public int End { get; set; } +} \ No newline at end of file diff --git a/PyroFetes/Models/Staff.cs b/PyroFetes/Models/Staff.cs new file mode 100644 index 0000000..fd6d846 --- /dev/null +++ b/PyroFetes/Models/Staff.cs @@ -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 Shows { get; set; } = new List(); +} \ No newline at end of file diff --git a/PyroFetes/Models/Truck.cs b/PyroFetes/Models/Truck.cs new file mode 100644 index 0000000..31b05e2 --- /dev/null +++ b/PyroFetes/Models/Truck.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations; + +namespace PyroFetes.Models; + +public class Truck +{ + [Key] public int Id { get; set; } + + [Required, MaxLength(40)] + public string Type { get; set; } = null!; + + [Range(0, double.MaxValue)] + public double? MaxExplosiveCapacity { get; set; } + + [MaxLength(80)] + public string? Sizes { get; set; } + + [MaxLength(40)] + public string? Statut { get; set; } + + [Required] + public int ShowId { get; set; } + public Show? Show { get; set; } +} \ No newline at end of file