création CreateShowEndpoint.cs et rectification quelque chemin

This commit is contained in:
2025-10-09 15:55:00 +02:00
parent c6ce3c658f
commit 139e849e41
62 changed files with 193 additions and 69 deletions

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Availability
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Brand
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class City
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Classification
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Color
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Communication
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Contact
{

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(ContactId), nameof(ServiceProviderId))]
public class ContactServiceProvider

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(ShowId), nameof(ServiceProviderId))]
public class Contract

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Customer
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class CustomerType
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Deliverer
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class DeliveryNote
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Effect
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class ExperienceLevel
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class HistoryOfApproval
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Material
{

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(MaterialId), nameof(WarehouseId))]
public class MaterialWarehouse

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Movement
{

View File

@@ -1,8 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.Runtime.CompilerServices;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(ProductId), nameof(SupplierId))]
public class Price

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models
namespace PF3.Models
{
public class Product
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class ProductCategory
{

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(ProductId), nameof(ColorId))]
public class ProductColor

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(ProductId), nameof(DeliveryNoteId))]
public class ProductDelivery

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(ProductId), nameof(EffectId))]
public class ProductEffect

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(ProductId), nameof(ShowId))]
public class ProductTimecode

View File

@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(ContactId), nameof(ProviderId))]
public class ProviderContact

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class ProviderType
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class PurchaseOrder
{

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(ProductId), nameof(PurchaseOrderId))]
public class PurchaseProduct

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Quotation
{

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(ProductId), nameof(QuotationId))]
public class QuotationProduct

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class ServiceProvider
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Setting
{

25
PF3/Models/Show.cs Normal file
View File

@@ -0,0 +1,25 @@
using System.ComponentModel.DataAnnotations;
namespace PF3.Models;
public class Show
{
[Key] public int Id { get; set; }
[Required, MaxLength(100)] public string? Name { get; set; }
[Required, MaxLength(120)] public string? Place { get; set; }
[MaxLength(500)] public string? Description { get; set; }
public DateOnly? Date { get; set; }
// Link (path/URL/file name) to the pyrotechnic implementation plan
[Required, MaxLength(500)] public string? PyrotechnicImplementationPlan { get; set; }
[Required] public int CityId { get; set; }
public City? City { get; set; }
public List<ShowStaff>? ShowStaffs { get; set; }
public List<ShowTruck>? ShowTrucks { get; set; }
public List<SoundTimecode>? SoundTimecodes { get; set; }
public List<ProductTimecode>? ProductTimecodes { get; set; }
public List<Contract>? Contracts { get; set; }
public List<ShowMaterial>? ShowMaterials { get; set; }
}

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(ShowId), nameof(MaterialId))]
public class ShowMaterial

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class ShowServiceProvider
{

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(StaffId), nameof(ShowId))]
public class ShowStaff

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(ShowId), nameof(TruckId))]
public class ShowTruck

20
PF3/Models/Sound.cs Normal file
View File

@@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;
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? SoundCategory { get; set; }
public List<SoundTimecode>? SoundTimecodes { get; set; }
}

View File

@@ -0,0 +1,11 @@
using System.ComponentModel.DataAnnotations;
namespace PF3.Models;
public class SoundCategory
{
[Key] public int Id { get; set; }
[Required, MaxLength(100)] public string Name { get; set; } = null!;
public List<Sound>? Sounds { get; set; }
}

View File

@@ -0,0 +1,16 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PF3.Models;
[PrimaryKey(nameof(ShowId), nameof(SoundId))]
public class SoundTimecode
{
[Required] public int ShowId { get; set; }
public Show? Show { get; set; }
[Required] public int SoundId { get; set; }
public Sound? Sound { get; set; }
[Required] public decimal Start { get; set; }
[Required] public decimal End { get; set; }
}

20
PF3/Models/Staff.cs Normal file
View File

@@ -0,0 +1,20 @@
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; }
[Required, MaxLength(100)] public string? F4T2NumberApproval { get; set; }
[Required] public DateOnly F4T2ExpirationDate { get; set; }
public List<ShowStaff>? ShowStaffs { get; set; }
public List<ExperienceLevel>? ExperienceLevels { get; set; }
public List<StaffAvailability>? StaffAvailabilities { get; set; }
public List<StaffHistoryOfApproval>? StaffHistoryOfApprovals { get; set; }
public List<StaffContact>? StaffContacts { get; set; }
}

View File

@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(AvailabilityId), nameof(StaffId))]
public class StaffAvailability

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(ContactId), nameof(StaffId))]
public class StaffContact

View File

@@ -1,6 +1,6 @@
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(HistoryOfApprovalId), nameof(StaffId))]
public class StaffHistoryOfApproval

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Supplier
{

14
PF3/Models/Truck.cs Normal file
View File

@@ -0,0 +1,14 @@
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!;
[Required] public double? MaxExplosiveCapacity { get; set; }
[Required, MaxLength(80)] public string? Sizes { get; set; }
[Required, MaxLength(40)] public string? Status { get; set; }
public List<ShowTruck>? ShowTrucks { get; set; }
}

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class User
{

View File

@@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
namespace PyroFetes.Models;
namespace PF3.Models;
public class Warehouse
{

View File

@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Models;
namespace PF3.Models;
[PrimaryKey(nameof(ProductId), nameof(WarehouseId))]
public class WarehouseProduct