diff --git a/PF3/DTO/Sound/Request/CreateSoundDto.cs b/PF3/DTO/Sound/Request/CreateSoundDto.cs index bc3ed9a..591f6d2 100644 --- a/PF3/DTO/Sound/Request/CreateSoundDto.cs +++ b/PF3/DTO/Sound/Request/CreateSoundDto.cs @@ -3,4 +3,12 @@ public class CreateSoundDto { public string? Name { get; set; } + public string? Type { get; set; } + public string? Artist { get; set; } + public string? Duration { get; set; } + public string? Kind { get; set; } + public string? Format { get; set; } + public string? CreationDate { get; set; } + public string? SoundCategoryId { get; set; } + } \ No newline at end of file diff --git a/PF3/DTO/Sound/Request/UpdateSoundDto.cs b/PF3/DTO/Sound/Request/UpdateSoundDto.cs index ddfe905..8bc3bdf 100644 --- a/PF3/DTO/Sound/Request/UpdateSoundDto.cs +++ b/PF3/DTO/Sound/Request/UpdateSoundDto.cs @@ -4,4 +4,12 @@ public class UpdateSoundDto { public int? Id { get; set; } public string? Name { get; set; } + public string? Type { get; set; } + public string? Artist { get; set; } + public string? Duration { get; set; } + public string? Kind { get; set; } + public string? Format { get; set; } + public string? CreationDate { get; set; } + public string? SoundCategoryId { get; set; } + } \ No newline at end of file diff --git a/PF3/DTO/Sound/Response/ReadSoundDto.cs b/PF3/DTO/Sound/Response/ReadSoundDto.cs index f6983d7..2c2bca5 100644 --- a/PF3/DTO/Sound/Response/ReadSoundDto.cs +++ b/PF3/DTO/Sound/Response/ReadSoundDto.cs @@ -4,4 +4,12 @@ public class ReadSoundDto { public int? Id { get; set; } public string? Name { get; set; } + public string? Type { get; set; } + public string? Artist { get; set; } + public string? Duration { get; set; } + public string? Kind { get; set; } + public string? Format { get; set; } + public string? CreationDate { get; set; } + public string? SoundCategoryId { get; set; } + } \ No newline at end of file diff --git a/PF3/DTO/SoundCategory/Request/CreateSoundCategoryDto.cs b/PF3/DTO/SoundCategory/Request/CreateSoundCategoryDto.cs index 7a4d807..743d458 100644 --- a/PF3/DTO/SoundCategory/Request/CreateSoundCategoryDto.cs +++ b/PF3/DTO/SoundCategory/Request/CreateSoundCategoryDto.cs @@ -3,11 +3,4 @@ public class CreateSoundCategoryDto { public string? Name { get; set; } - public string? Type { get; set; } - public string? Artist { get; set; } - public string? Duration { get; set; } - public string? Kind { get; set; } - public string? Format { get; set; } - public string? CreationDate { get; set; } - public string? SoundCategoryId { get; set; } } \ No newline at end of file diff --git a/PF3/DTO/SoundCategory/Request/UpdateSoundCategoryDto.cs b/PF3/DTO/SoundCategory/Request/UpdateSoundCategoryDto.cs index bdf7d4f..43e7e1f 100644 --- a/PF3/DTO/SoundCategory/Request/UpdateSoundCategoryDto.cs +++ b/PF3/DTO/SoundCategory/Request/UpdateSoundCategoryDto.cs @@ -4,11 +4,4 @@ public class UpdateSoundCategoryDto { public int? Id { get; set; } public string? Name { get; set; } - public string? Type { get; set; } - public string? Artist { get; set; } - public string? Duration { get; set; } - public string? Kind { get; set; } - public string? Format { get; set; } - public string? CreationDate { get; set; } - public string? SoundCategoryId { get; set; } } \ No newline at end of file diff --git a/PF3/DTO/SoundCategory/Response/ReadSoundCategoryDto.cs b/PF3/DTO/SoundCategory/Response/ReadSoundCategoryDto.cs index f433964..c113b6f 100644 --- a/PF3/DTO/SoundCategory/Response/ReadSoundCategoryDto.cs +++ b/PF3/DTO/SoundCategory/Response/ReadSoundCategoryDto.cs @@ -4,11 +4,4 @@ public class ReadSoundCategoryDto { public int? Id { get; set; } public string? Name { get; set; } - public string? Type { get; set; } - public string? Artist { get; set; } - public string? Duration { get; set; } - public string? Kind { get; set; } - public string? Format { get; set; } - public string? CreationDate { get; set; } - public string? SoundCategoryId { get; set; } } \ No newline at end of file diff --git a/PF3/DTO/Truck/Request/CreateTruckDto.cs b/PF3/DTO/Truck/Request/CreateTruckDto.cs index e49a883..6b306b8 100644 --- a/PF3/DTO/Truck/Request/CreateTruckDto.cs +++ b/PF3/DTO/Truck/Request/CreateTruckDto.cs @@ -3,7 +3,7 @@ public class CreateTruckDto { public string? Type { get; set; } - public string? MaxExplosiveCapacity { get; set; } + public double? MaxExplosiveCapacity { get; set; } public string? Sizes { get; set; } public bool? Statut { get; set; } public int? ShowId { get; set; } diff --git a/PF3/Models/Show.cs b/PF3/Models/Show.cs new file mode 100644 index 0000000..b076106 --- /dev/null +++ b/PF3/Models/Show.cs @@ -0,0 +1,27 @@ +using System.ComponentModel.DataAnnotations; + +namespace PF3.Models; + +public class Show +{ + [Key] public int Id { get; set; } + + [Required] + public string? Name { get; set; } + + [Required, 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 + [Required, 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/PF3/Models/Sound.cs b/PF3/Models/Sound.cs new file mode 100644 index 0000000..f1fbf0c --- /dev/null +++ b/PF3/Models/Sound.cs @@ -0,0 +1,35 @@ +using System.ComponentModel.DataAnnotations; +using PF3.Models; + +namespace PF3.Models; + +public class Sound +{ + [Key] public int Id { get; set; } + + [Required, MaxLength(120)] + public string Name { get; set; } = null!; + + [Required, MaxLength(60)] + public string? Type { get; set; } + + [Required, MaxLength(120)] + public string? Artist { get; set; } + + [Required, Range(0, int.MaxValue)] + public int? Duration { get; set; } + + [Required, MaxLength(40)] + public string? Kind { get; set; } + + [Required, 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/PF3/Models/SoundCategory.cs b/PF3/Models/SoundCategory.cs new file mode 100644 index 0000000..89d67bc --- /dev/null +++ b/PF3/Models/SoundCategory.cs @@ -0,0 +1,13 @@ +using System.ComponentModel.DataAnnotations; + +namespace PF3.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/PF3/Models/SoundTimecode.cs b/PF3/Models/SoundTimecode.cs new file mode 100644 index 0000000..0f349ce --- /dev/null +++ b/PF3/Models/SoundTimecode.cs @@ -0,0 +1,22 @@ +using System.ComponentModel.DataAnnotations; + +namespace PF3.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/PF3/Models/Staff.cs b/PF3/Models/Staff.cs new file mode 100644 index 0000000..caa3c1e --- /dev/null +++ b/PF3/Models/Staff.cs @@ -0,0 +1,22 @@ +using System.ComponentModel.DataAnnotations; + +namespace PF3.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!; + + [Required, MaxLength(100)] + public string? Profession { get; set; } + + [Required, MaxLength(120)] + public string? Email { get; set; } + + public ICollection Shows { get; set; } = new List(); +} \ No newline at end of file diff --git a/PF3/Models/Truck.cs b/PF3/Models/Truck.cs new file mode 100644 index 0000000..aae485f --- /dev/null +++ b/PF3/Models/Truck.cs @@ -0,0 +1,24 @@ +using System.ComponentModel.DataAnnotations; + +namespace PF3.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; } + + [Required, MaxLength(80)] + public string? Sizes { get; set; } + + [Required, MaxLength(40)] + public string? Statut { get; set; } + + [Required] + public int ShowId { get; set; } + public Show? Show { get; set; } +} \ No newline at end of file diff --git a/PF3/PF3.csproj b/PF3/PF3.csproj index 50c7d75..72289cb 100644 --- a/PF3/PF3.csproj +++ b/PF3/PF3.csproj @@ -16,7 +16,6 @@ -