diff --git a/PF3/DTO/SoundTimecode/Request/CreateSoundTimecodeDto.cs b/PF3/DTO/SoundTimecode/Request/CreateSoundTimecodeDto.cs index e4256a3..54093b2 100644 --- a/PF3/DTO/SoundTimecode/Request/CreateSoundTimecodeDto.cs +++ b/PF3/DTO/SoundTimecode/Request/CreateSoundTimecodeDto.cs @@ -2,8 +2,8 @@ public class CreateSoundTimecodeDto { - public int? ShowId { get; set; } - public int? SoundId { get; set; } - public string? Start { get; set; } - public string? End { get; set; } + public int ShowId { get; set; } + public int SoundId { get; set; } + public int Start { get; set; } + public int End { get; set; } } \ No newline at end of file diff --git a/PF3/DTO/SoundTimecode/Request/UpdateSoundTimecodeDto.cs b/PF3/DTO/SoundTimecode/Request/UpdateSoundTimecodeDto.cs index 0397435..9352795 100644 --- a/PF3/DTO/SoundTimecode/Request/UpdateSoundTimecodeDto.cs +++ b/PF3/DTO/SoundTimecode/Request/UpdateSoundTimecodeDto.cs @@ -3,8 +3,8 @@ public class UpdateSoundTimecodeDto { public int? Id { get; set; } - public int? ShowId { get; set; } - public int? SoundId { get; set; } - public string? Start { get; set; } - public string? End { get; set; } + public int ShowId { get; set; } + public int SoundId { get; set; } + public int Start { get; set; } + public int End { get; set; } } \ No newline at end of file diff --git a/PF3/DTO/SoundTimecode/Response/ReadSoundTimecodeDto.cs b/PF3/DTO/SoundTimecode/Response/ReadSoundTimecodeDto.cs index c8e4cc7..cf32366 100644 --- a/PF3/DTO/SoundTimecode/Response/ReadSoundTimecodeDto.cs +++ b/PF3/DTO/SoundTimecode/Response/ReadSoundTimecodeDto.cs @@ -5,6 +5,6 @@ public class ReadSoundTimecodeDto public int? Id { get; set; } public int? ShowId { get; set; } public int? SoundId { get; set; } - public string? Start { get; set; } - public string? End { get; set; } + public int Start { get; set; } + public int End { 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 6b306b8..c71313d 100644 --- a/PF3/DTO/Truck/Request/CreateTruckDto.cs +++ b/PF3/DTO/Truck/Request/CreateTruckDto.cs @@ -3,8 +3,8 @@ public class CreateTruckDto { public string? Type { get; set; } - public double? MaxExplosiveCapacity { get; set; } + public string? MaxExplosiveCapacity { get; set; } public string? Sizes { get; set; } - public bool? Statut { get; set; } + public string? Statut { get; set; } public int? ShowId { get; set; } } \ No newline at end of file diff --git a/PF3/DTO/Truck/Request/UpdateTruckDto.cs b/PF3/DTO/Truck/Request/UpdateTruckDto.cs index 8743417..4ddf924 100644 --- a/PF3/DTO/Truck/Request/UpdateTruckDto.cs +++ b/PF3/DTO/Truck/Request/UpdateTruckDto.cs @@ -6,6 +6,6 @@ public class UpdateTruckDto public string? Type { get; set; } public string? MaxExplosiveCapacity { get; set; } public string? Sizes { get; set; } - public bool? Statut { get; set; } + public string? Statut { get; set; } public int? ShowId { get; set; } } \ No newline at end of file diff --git a/PF3/DTO/Truck/Response/ReadTruckDto.cs b/PF3/DTO/Truck/Response/ReadTruckDto.cs index 4218a76..110208a 100644 --- a/PF3/DTO/Truck/Response/ReadTruckDto.cs +++ b/PF3/DTO/Truck/Response/ReadTruckDto.cs @@ -6,6 +6,6 @@ public class ReadTruckDto public string? Type { get; set; } public string? MaxExplosiveCapacity { get; set; } public string? Sizes { get; set; } - public bool? Statut { get; set; } + public string? Statut { get; set; } public int? ShowId { get; set; } } \ No newline at end of file diff --git a/PF3/Endpoint/CreateTruckEndpoint.cs b/PF3/Endpoint/CreateTruckEndpoint.cs deleted file mode 100644 index 270d795..0000000 --- a/PF3/Endpoint/CreateTruckEndpoint.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Net; -using PF3.DTO.Truck.Request; -using PF3.DTO.Truck.Response; - -namespace PF3.Endpoint; - -public class CreateTruckEndpoint(PF3DbContext pf3DbContext):EndPoint -{ -} \ No newline at end of file diff --git a/PF3/Endpoints/SoundCategory/CreateSoundCategoryEndpoint.cs b/PF3/Endpoints/SoundCategory/CreateSoundCategoryEndpoint.cs new file mode 100644 index 0000000..0bc516c --- /dev/null +++ b/PF3/Endpoints/SoundCategory/CreateSoundCategoryEndpoint.cs @@ -0,0 +1,34 @@ +using FastEndpoints; +using PF3.DTO.SoundCategory.Request; +using PF3.DTO.SoundCategory.Response; +using PF3.Models; + +namespace PF3.Endpoints.SoundCategory; + +public class CreateSoundCategoryEndpoint(PF3DbContext pf3DbContext) : Endpoint +{ + public override void Configure() + { + Post("/api/soundcategorys"); + AllowAnonymous(); + } + + public override async Task HandleAsync(CreateSoundCategoryDto req, CancellationToken ct) + { + var soundCategory = new Models.SoundCategory + { + Name = req.Name, + }; + + pf3DbContext.SoundsCategorys.Add(soundCategory); + await pf3DbContext.SaveChangesAsync(ct); + + var result = new ReadSoundCategoryDto + { + Id = soundCategory.Id, + Name = soundCategory.Name + }; + + await Send.OkAsync(result, ct); + } +} \ No newline at end of file diff --git a/PF3/Endpoints/SoundCategory/DeleteSoundCategoryEndpoint.cs b/PF3/Endpoints/SoundCategory/DeleteSoundCategoryEndpoint.cs new file mode 100644 index 0000000..416c271 --- /dev/null +++ b/PF3/Endpoints/SoundCategory/DeleteSoundCategoryEndpoint.cs @@ -0,0 +1,29 @@ +using FastEndpoints; +using Microsoft.EntityFrameworkCore; +using PF3.DTO.SoundCategory.Request; + +namespace PF3.Endpoints.SoundCategory; + +public class DeleteSoundCategoryEndpoint(PF3DbContext pf3DbContext) : Endpoint +{ + public override void Configure() + { + Delete("/api/soundcategorys/{Id}"); + AllowAnonymous(); + } + + public override async Task HandleAsync(IdSoundCategoryDto req, CancellationToken ct) + { + var soundCategory = await pf3DbContext.SoundsCategorys.FirstOrDefaultAsync(st => st.Id == req.Id, ct); + if (soundCategory is null) + { + await Send.NotFoundAsync(ct); + return; + } + + pf3DbContext.SoundsCategorys.Remove(soundCategory); + await pf3DbContext.SaveChangesAsync(ct); + + await Send.OkAsync(ct); + } +} \ No newline at end of file diff --git a/PF3/Endpoints/SoundCategory/GetAllSoundCategoryEndpoint.cs b/PF3/Endpoints/SoundCategory/GetAllSoundCategoryEndpoint.cs new file mode 100644 index 0000000..4dd534d --- /dev/null +++ b/PF3/Endpoints/SoundCategory/GetAllSoundCategoryEndpoint.cs @@ -0,0 +1,27 @@ +using FastEndpoints; +using Microsoft.EntityFrameworkCore; +using PF3.DTO.SoundCategory.Response; + +namespace PF3.Endpoints.SoundCategory; + +public class GetAllSoundCategorysEndpoint(PF3DbContext pf3DbContext) : EndpointWithoutRequest> +{ + public override void Configure() + { + Get("/api/soundcategorys"); + AllowAnonymous(); + } + + public override async Task HandleAsync(CancellationToken ct) + { + var soundCategorys = await pf3DbContext.SoundsCategorys.ToListAsync(ct); + + var result = soundCategorys.Select(sC => new ReadSoundCategoryDto + { + Id = sC.Id, + Name = sC.Name + }).ToList(); + + await Send.OkAsync(result, ct); + } +} \ No newline at end of file diff --git a/PF3/Endpoints/SoundCategory/GetSoundCategoryEndpoint.cs b/PF3/Endpoints/SoundCategory/GetSoundCategoryEndpoint.cs new file mode 100644 index 0000000..b4d2e69 --- /dev/null +++ b/PF3/Endpoints/SoundCategory/GetSoundCategoryEndpoint.cs @@ -0,0 +1,35 @@ +using FastEndpoints; +using Microsoft.EntityFrameworkCore; +using PF3.DTO.SoundCategory.Request; +using PF3.DTO.SoundCategory.Response; + +namespace PF3.Endpoints.SoundCategory; + +public class GetSoundCategoryEndpoint(PF3DbContext pf3DbContext) : Endpoint +{ + public override void Configure() + { + Get("/api/soundcategorys/{Id}"); + AllowAnonymous(); + } + + public override async Task HandleAsync(IdSoundCategoryDto req, CancellationToken ct) + { + var soundCategory = await pf3DbContext.SoundsCategorys + .Where(sc => sc.Id == req.Id) + .Select(sc => new ReadSoundCategoryDto + { + Id = sc.Id, + Name = sc.Name, + }) + .FirstOrDefaultAsync(ct); + + if (soundCategory is null) + { + await Send.NotFoundAsync(ct); + return; + } + + await Send.OkAsync(soundCategory, ct); + } +} \ No newline at end of file diff --git a/PF3/Endpoints/SoundCategory/UpdateSoundCategoryEndpoint.cs b/PF3/Endpoints/SoundCategory/UpdateSoundCategoryEndpoint.cs new file mode 100644 index 0000000..83ff0c0 --- /dev/null +++ b/PF3/Endpoints/SoundCategory/UpdateSoundCategoryEndpoint.cs @@ -0,0 +1,37 @@ +using FastEndpoints; +using Microsoft.EntityFrameworkCore; +using PF3.DTO.SoundCategory.Request; +using PF3.DTO.SoundCategory.Response; + +namespace PF3.Endpoints.SoundCategory; + +public class UpdateSoundCategoryEndpoint(PF3DbContext pf3DbContext) : Endpoint +{ + public override void Configure() + { + Patch("/api/soundcategorys/{Id}/name"); + AllowAnonymous(); + } + + public override async Task HandleAsync(UpdateSoundCategoryDto req, CancellationToken ct) + { + var soundCategory = await pf3DbContext.SoundsCategorys.FirstOrDefaultAsync(st => st.Id == req.Id, ct); + if (soundCategory is null) + { + await Send.NotFoundAsync(ct); + return; + } + + soundCategory.Name = req.Name; + + await pf3DbContext.SaveChangesAsync(ct); + + var result = new ReadSoundCategoryDto + { + Id = soundCategory.Id, + Name = soundCategory.Name + }; + + await Send.OkAsync(result, ct); + } +} \ No newline at end of file diff --git a/PF3/Endpoints/Staff/CreateStaffEndpoint.cs b/PF3/Endpoints/Staff/CreateStaffEndpoint.cs new file mode 100644 index 0000000..08fee1c --- /dev/null +++ b/PF3/Endpoints/Staff/CreateStaffEndpoint.cs @@ -0,0 +1,40 @@ +using FastEndpoints; +using PF3.DTO.Staff.Request; +using PF3.DTO.Staff.Response; + +namespace PF3.Endpoints.Staff; + +public class CreateStaffEndpoint(PF3DbContext pf3DbContext):Endpoint +{ + public override void Configure() + { + Post("/api/staff"); + AllowAnonymous(); + } + + public override async Task HandleAsync(CreateStaffDto req, CancellationToken ct) + { + var staff = new Models.Staff + { + FirstName = req.FirstName, + LastName = req.LastName, + Profession = req.Profession, + Email = req.Email + }; + + pf3DbContext.Staffs.Add(staff); + await pf3DbContext.SaveChangesAsync(ct); + + var result = new ReadStaffDto() + { + Id = staff.Id, + FirstName = req.FirstName, + LastName = req.LastName, + Profession = req.Profession, + Email = req.Email + }; + + await Send.OkAsync(result, ct); + + } +} \ No newline at end of file diff --git a/PF3/Endpoints/Staff/DeleteStaffEndpoint.cs b/PF3/Endpoints/Staff/DeleteStaffEndpoint.cs new file mode 100644 index 0000000..b81e9de --- /dev/null +++ b/PF3/Endpoints/Staff/DeleteStaffEndpoint.cs @@ -0,0 +1,29 @@ +using FastEndpoints; +using Microsoft.EntityFrameworkCore; +using PF3.DTO.Staff.Request; + +namespace PF3.Endpoints.Staff; + +public class DeleteStaffEndpoint(PF3DbContext pf3DbContext) : Endpoint +{ + public override void Configure() + { + Delete("/api/staff/{Id}"); + AllowAnonymous(); + } + + public override async Task HandleAsync(IdStaffDto req, CancellationToken ct) + { + var staff = await pf3DbContext.Staffs.FirstOrDefaultAsync(s => s.Id == req.Id, ct); + if (staff is null) + { + await Send.NotFoundAsync(ct); + return; + } + + pf3DbContext.Staffs.Remove(staff); + await pf3DbContext.SaveChangesAsync(ct); + + await Send.OkAsync(ct); + } +} \ No newline at end of file diff --git a/PF3/Endpoints/Staff/GetAllStaffEndpoint.cs b/PF3/Endpoints/Staff/GetAllStaffEndpoint.cs new file mode 100644 index 0000000..b8c85d7 --- /dev/null +++ b/PF3/Endpoints/Staff/GetAllStaffEndpoint.cs @@ -0,0 +1,30 @@ +using FastEndpoints; +using Microsoft.EntityFrameworkCore; +using PF3.DTO.Staff.Response; + +namespace PF3.Endpoints.Staff; + +public class GetAllStaffEndpoint(PF3DbContext pf3DbContext) : EndpointWithoutRequest> +{ + public override void Configure() + { + Get("/api/staff"); + AllowAnonymous(); + } + + public override async Task HandleAsync(CancellationToken ct) + { + var staffs = await pf3DbContext.Staffs.ToListAsync(ct); + + var result = staffs.Select(s => new ReadStaffDto + { + Id = s.Id, + FirstName = s.FirstName, + LastName = s.LastName, + Profession = s.Profession, + Email = s.Email + }).ToList(); + + await Send.OkAsync(result, ct); + } +} \ No newline at end of file diff --git a/PF3/Endpoints/Staff/GetStaffEndpoint.cs b/PF3/Endpoints/Staff/GetStaffEndpoint.cs new file mode 100644 index 0000000..67624c8 --- /dev/null +++ b/PF3/Endpoints/Staff/GetStaffEndpoint.cs @@ -0,0 +1,38 @@ +using FastEndpoints; +using Microsoft.EntityFrameworkCore; +using PF3.DTO.Staff.Request; +using PF3.DTO.Staff.Response; + +namespace PF3.Endpoints.Staff; + +public class GetStaffEndpoint(PF3DbContext pf3DbContext) : Endpoint +{ + public override void Configure() + { + Get("/api/staff/{Id}"); + AllowAnonymous(); + } + + public override async Task HandleAsync(IdStaffDto req, CancellationToken ct) + { + var staff = await pf3DbContext.Staffs + .Where(s => s.Id == req.Id) + .Select(s => new ReadStaffDto + { + Id = s.Id, + FirstName = s.FirstName, + LastName = s.LastName, + Profession = s.Profession, + Email = s.Email + }) + .FirstOrDefaultAsync(ct); + + if (staff is null) + { + await Send.NotFoundAsync(ct); + return; + } + + await Send.OkAsync(staff, ct); + } +} \ No newline at end of file diff --git a/PF3/Endpoints/Staff/UpdateStaffEndpoint.cs b/PF3/Endpoints/Staff/UpdateStaffEndpoint.cs new file mode 100644 index 0000000..3af1977 --- /dev/null +++ b/PF3/Endpoints/Staff/UpdateStaffEndpoint.cs @@ -0,0 +1,43 @@ +using FastEndpoints; +using Microsoft.EntityFrameworkCore; +using PF3.DTO.Staff.Request; +using PF3.DTO.Staff.Response; + +namespace PF3.Endpoints.Staff; + +public class UpdateStaffEndpoint(PF3DbContext pf3DbContext) : Endpoint +{ + public override void Configure() + { + Put("/api/staff/{Id}"); + AllowAnonymous(); + } + + public override async Task HandleAsync(UpdateStaffDto req, CancellationToken ct) + { + var staff = await pf3DbContext.Staffs.FirstOrDefaultAsync(s => s.Id == req.Id, ct); + if (staff is null) + { + await Send.NotFoundAsync(ct); + return; + } + + staff.FirstName = req.FirstName; + staff.LastName = req.LastName; + staff.Profession = req.Profession; + staff.Email = req.Email; + + await pf3DbContext.SaveChangesAsync(ct); + + var result = new ReadStaffDto + { + Id = staff.Id, + FirstName = staff.FirstName, + LastName = staff.LastName, + Profession = staff.Profession, + Email = staff.Email + }; + + await Send.OkAsync(result, ct); + } +} \ No newline at end of file diff --git a/PF3/Endpoints/Truck/CreateTruckEndpoint.cs b/PF3/Endpoints/Truck/CreateTruckEndpoint.cs new file mode 100644 index 0000000..57fa29a --- /dev/null +++ b/PF3/Endpoints/Truck/CreateTruckEndpoint.cs @@ -0,0 +1,40 @@ +using FastEndpoints; +using PF3.DTO.Truck.Request; +using PF3.DTO.Truck.Response; + +namespace PF3.Endpoints.Truck; + +public class CreateTruckEndpoint(PF3DbContext pf3DbContext):Endpoint +{ + public override void Configure() + { + Post("/api/truck"); + AllowAnonymous(); + } + + public override async Task HandleAsync(CreateTruckDto req, CancellationToken ct) + { + var truck = new Models.Truck + { + Type = req.Type, + MaxExplosiveCapacity = req.MaxExplosiveCapacity, + Sizes = req.Sizes, + Statut = req.Statut + }; + + pf3DbContext.Trucks.Add(truck); + await pf3DbContext.SaveChangesAsync(ct); + + var result = new ReadTruckDto() + { + Id = truck.Id, + Type = truck.Type, + MaxExplosiveCapacity = truck.MaxExplosiveCapacity, + Sizes = truck.Sizes, + Statut = truck.Statut + }; + + await Send.OkAsync(result, ct); + + } +} \ No newline at end of file diff --git a/PF3/Endpoints/Truck/DeleteTruckEndpoint.cs b/PF3/Endpoints/Truck/DeleteTruckEndpoint.cs new file mode 100644 index 0000000..90cba0e --- /dev/null +++ b/PF3/Endpoints/Truck/DeleteTruckEndpoint.cs @@ -0,0 +1,24 @@ +using PF3.DTO.Truck.Request; +using FastEndpoints; +using Microsoft.EntityFrameworkCore; +using PF3; + +namespace ApiLibrary.Endpoints.Truck; + +public class DeleteTruckEndpoint(PF3DbContext pf3DbContext) : Endpoint +{ + public override void Configure() + { + Delete("/api/trucks/{@Id}", x => new { x.Id }); + } + + public override async Task HandleAsync(IdTruckDto req, CancellationToken ct) + { + var truck = await pf3DbContext.Trucks.FirstOrDefaultAsync(a => a.Id == req.Id, ct); + + pf3DbContext.Trucks.Remove(truck); + await pf3DbContext.SaveChangesAsync(ct); + + await Send.OkAsync(ct); + } +} \ No newline at end of file diff --git a/PF3/Endpoints/Truck/GetAllTruckEndpoint.cs b/PF3/Endpoints/Truck/GetAllTruckEndpoint.cs new file mode 100644 index 0000000..a6d2e65 --- /dev/null +++ b/PF3/Endpoints/Truck/GetAllTruckEndpoint.cs @@ -0,0 +1,33 @@ +using PF3.DTO.Truck.Response; +using FastEndpoints; +using Microsoft.EntityFrameworkCore; +using PF3; + +namespace PF3.Endpoints.Truck; + +public class GetAllTrucksEndpoint(PF3DbContext pf3DbContext) : EndpointWithoutRequest> +{ + public override void Configure() + { + Get("/api/trucks"); + } + + public override async Task HandleAsync(CancellationToken ct) + { + var trucks = await pf3DbContext.Trucks.ToListAsync(ct); + + var result = trucks + .Select(truck => new ReadTruckDto + { + Id = truck.Id, + Type = truck.Type, + MaxExplosiveCapacity = truck.MaxExplosiveCapacity, + Sizes = truck.Sizes, + Statut = truck.Statut, + ShowId = truck.ShowId + }) + .ToList(); + + await Send.OkAsync(result, ct); + } +} \ No newline at end of file diff --git a/PF3/Endpoints/Truck/GetTruckEndpoint.cs b/PF3/Endpoints/Truck/GetTruckEndpoint.cs new file mode 100644 index 0000000..b228ea5 --- /dev/null +++ b/PF3/Endpoints/Truck/GetTruckEndpoint.cs @@ -0,0 +1,39 @@ +using PF3.DTO.Truck.Request; +using PF3.DTO.Truck.Response; +using FastEndpoints; +using Microsoft.EntityFrameworkCore; +using PF3; + +namespace PF3.Endpoints.Truck; + +public class GetTruckEndpoint(PF3DbContext pf3DbContext) : Endpoint +{ + public override void Configure() + { + Get("/api/trucks/{@Id}"); + } + + public override async Task HandleAsync(IdTruckDto req, CancellationToken ct) + { + var truck = await pf3DbContext.Trucks + .Where(t => t.Id == req.Id) + .Select(t => new ReadTruckDto + { + Id = t.Id, + Type = t.Type, + MaxExplosiveCapacity = t.MaxExplosiveCapacity, + Sizes = t.Sizes, + Statut = t.Statut, + ShowId = t.ShowId + }) + .FirstOrDefaultAsync(ct); + + if (truck is null) + { + await Send.NotFoundAsync(ct); + return; + } + + await Send.OkAsync(truck, ct); + } +} \ No newline at end of file diff --git a/PF3/Endpoints/Truck/UpdateTruckEndpoint.cs b/PF3/Endpoints/Truck/UpdateTruckEndpoint.cs new file mode 100644 index 0000000..3a6fce9 --- /dev/null +++ b/PF3/Endpoints/Truck/UpdateTruckEndpoint.cs @@ -0,0 +1,48 @@ +using PF3.DTO.Truck.Request; +using PF3.DTO.Truck.Response; +using FastEndpoints; +using Microsoft.EntityFrameworkCore; +using PF3; + +namespace PF3.Endpoints.Truck; + +public class UpdateTruckEndpoint(PF3DbContext pf3DbContext) : Endpoint +{ + public override void Configure() + { + Put("/api/trucks/{id}"); + } + + public override async Task HandleAsync(UpdateTruckDto req, CancellationToken ct) + { + var id = Route("id"); + + var truck = await pf3DbContext.Trucks.FirstOrDefaultAsync(t => t.Id == id, ct); + + if (truck is null) + { + await Send.NotFoundAsync(ct); + return; + } + + truck.Type = req.Type; + truck.MaxExplosiveCapacity = req.MaxExplosiveCapacity; + truck.Sizes = req.Sizes; + truck.Statut = req.Statut; + truck.ShowId = req.ShowId; + + await pf3DbContext.SaveChangesAsync(ct); + + var result = new ReadTruckDto + { + Id = truck.Id, + Type = truck.Type, + MaxExplosiveCapacity = truck.MaxExplosiveCapacity, + Sizes = truck.Sizes, + Statut = truck.Statut, + ShowId = truck.ShowId + }; + + await Send.OkAsync(result, ct); + } +} \ No newline at end of file diff --git a/PF3/Models/Staff.cs b/PF3/Models/Staff.cs index caa3c1e..3495783 100644 --- a/PF3/Models/Staff.cs +++ b/PF3/Models/Staff.cs @@ -7,10 +7,10 @@ public class Staff [Key] public int Id { get; set; } [Required, MaxLength(60)] - public string FirstName { get; set; } = null!; + public string? FirstName { get; set; } = null!; [Required, MaxLength(60)] - public string LastName { get; set; } = null!; + public string? LastName { get; set; } = null!; [Required, MaxLength(100)] public string? Profession { get; set; } diff --git a/PF3/Models/Truck.cs b/PF3/Models/Truck.cs index aae485f..1817b37 100644 --- a/PF3/Models/Truck.cs +++ b/PF3/Models/Truck.cs @@ -7,10 +7,10 @@ public class Truck [Key] public int Id { get; set; } [Required, MaxLength(40)] - public string Type { get; set; } = null!; + public string? Type { get; set; } = null!; [Range(0, double.MaxValue)] - public double? MaxExplosiveCapacity { get; set; } + public string? MaxExplosiveCapacity { get; set; } [Required, MaxLength(80)] public string? Sizes { get; set; } @@ -19,6 +19,6 @@ public class Truck public string? Statut { get; set; } [Required] - public int ShowId { get; set; } + 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 e002d36..534cb23 100644 --- a/PF3/PF3.csproj +++ b/PF3/PF3.csproj @@ -23,6 +23,9 @@ + + + diff --git a/PF3/obj/Debug/net8.0/PF3.AssemblyInfo.cs b/PF3/obj/Debug/net8.0/PF3.AssemblyInfo.cs index 7335a7e..3108ded 100644 --- a/PF3/obj/Debug/net8.0/PF3.AssemblyInfo.cs +++ b/PF3/obj/Debug/net8.0/PF3.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("PF3")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+165addd785553761de758f16e2d3cc058655af80")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8d0c2aa3f65ecf346de689fc5cf245d03bdfa389")] [assembly: System.Reflection.AssemblyProductAttribute("PF3")] [assembly: System.Reflection.AssemblyTitleAttribute("PF3")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/PF3/obj/Debug/net8.0/PF3.AssemblyInfoInputs.cache b/PF3/obj/Debug/net8.0/PF3.AssemblyInfoInputs.cache index f84d0d0..8d6933e 100644 --- a/PF3/obj/Debug/net8.0/PF3.AssemblyInfoInputs.cache +++ b/PF3/obj/Debug/net8.0/PF3.AssemblyInfoInputs.cache @@ -1 +1 @@ -d3139df06f9994cda4be2d362ebfc6c074efb01538849556b5345e908fb503b4 +ee982ef4ec9c48c98f177c2b539dc42b46b252a39b493b307728df084d0fdc9e diff --git a/PF3/obj/rider.project.model.nuget.info b/PF3/obj/rider.project.model.nuget.info index 0dcf82a..1549fbb 100644 --- a/PF3/obj/rider.project.model.nuget.info +++ b/PF3/obj/rider.project.model.nuget.info @@ -1 +1 @@ -17594197352093296 \ No newline at end of file +17594197379870438 \ No newline at end of file