forked from sanchezvem/PyroFetes
Correction de toutes les erreurs de relations et d'écritures dans tous
This commit is contained in:
@@ -11,9 +11,9 @@ public class Movement
|
||||
[Required] public int Quantity {get; set;}
|
||||
|
||||
public List<Product>? Products { get; set; }
|
||||
|
||||
public int? SourceWarehouseId {get; set;}
|
||||
public Warehouse? SourceWarehouse {get; set;}
|
||||
|
||||
public int? DestinationWarehouseId {get; set;}
|
||||
public Warehouse? DestinationWarehouse {get; set;}
|
||||
}
|
@@ -5,20 +5,18 @@ namespace PyroFetes.Models;
|
||||
public class Show
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public string? Name { 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; }
|
||||
|
||||
public DateOnly? Date { get; set; }
|
||||
|
||||
[Required] public int CityId { get; set; }
|
||||
public City? City { get; set; }
|
||||
|
||||
public ICollection<Staff>? Staff { get; set; }
|
||||
public ICollection<Truck>? Trucks { get; set; }
|
||||
|
||||
public List<ShowStaff>? ShowStaffs { get; set; }
|
||||
public List<ShowTruck>? ShowTrucks { get; set; }
|
||||
public List<SoundTimecode>? SoundTimecodes { get; set; }
|
||||
}
|
14
PyroFetes/Models/ShowStaff.cs
Normal file
14
PyroFetes/Models/ShowStaff.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(StaffId), nameof(ShowId))]
|
||||
public class ShowStaff
|
||||
{
|
||||
public Staff? Staff { get; set; }
|
||||
[Required] public int StaffId { get; set; }
|
||||
|
||||
public Show? Show { get; set; }
|
||||
[Required] public int ShowId { get; set; }
|
||||
}
|
14
PyroFetes/Models/ShowTruck.cs
Normal file
14
PyroFetes/Models/ShowTruck.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ShowId), nameof(TruckId))]
|
||||
public class ShowTruck
|
||||
{
|
||||
public Show? Show { get; set; }
|
||||
[Required] public int ShowId { get; set; }
|
||||
|
||||
public Truck? Truck { get; set; }
|
||||
[Required] public int TruckId { get; set; }
|
||||
}
|
@@ -9,7 +9,8 @@ public class Staff
|
||||
[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] public string? F4T2NumberApproval { get; set; }
|
||||
[Required, MaxLength(100)] public string? F4T2NumberApproval { get; set; }
|
||||
[Required] public DateOnly F4T2ExpirationDate { get; set; }
|
||||
public ICollection<Show>? Shows { get; set; }
|
||||
|
||||
public List<ShowStaff>? ShowStaffs { get; set; }
|
||||
}
|
@@ -6,9 +6,9 @@ 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] public double? MaxExplosiveCapacity { get; set; }
|
||||
[Required, MaxLength(80)] public string? Sizes { get; set; }
|
||||
[Required, MaxLength(40)] public string? Status { get; set; }
|
||||
[Required] public int ShowId { get; set; }
|
||||
public Show? Show { get; set; }
|
||||
|
||||
public List<ShowTruck>? ShowTrucks { get; set; }
|
||||
}
|
@@ -14,6 +14,8 @@ public class Warehouse
|
||||
[Required, MaxLength(100)] public string? City { get; set; }
|
||||
|
||||
public List<WarehouseProduct>? WarehouseProducts { get; set; }
|
||||
|
||||
|
||||
public List<Material>? Materials {get; set;}
|
||||
public List<Movement>? MovementsSource { get; set; }
|
||||
public List<Movement>? MovementsDestination { get; set; }
|
||||
|
Reference in New Issue
Block a user