Cleaned code
This commit is contained in:
@@ -9,6 +9,6 @@ public class Availability
|
||||
[Required] public DateOnly DeliveryDate { get; set; }
|
||||
[Required] public DateOnly ExpirationDate { get; set; }
|
||||
[Required] public DateOnly RenewallDate { get; set; }
|
||||
|
||||
|
||||
public List<StaffAvailability>? StaffAvailabilities { get; set; }
|
||||
}
|
||||
@@ -4,9 +4,9 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Brand
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
|
||||
[Required] public int ProductId { get; set; }
|
||||
[Required] public Product? Product { get; set; }
|
||||
}
|
||||
@@ -4,9 +4,9 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class City
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
[Required] public int ZipCode { get; set; }
|
||||
|
||||
|
||||
public List<Show>? Shows { get; set; }
|
||||
}
|
||||
@@ -4,8 +4,8 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Classification
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
public List<Product>? Products { get; set; }
|
||||
}
|
||||
@@ -4,8 +4,8 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Color
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
public List<ProductColor>? ProductColors { get; set; }
|
||||
}
|
||||
@@ -4,11 +4,11 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Communication
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Calling { get; set; }
|
||||
[Required, MaxLength(100)] public string? Email { get; set; }
|
||||
[Required, MaxLength(300)] public string? Meeting { get; set; }
|
||||
|
||||
|
||||
[Required] public int ContactId { get; set; }
|
||||
public Contact? Contact { get; set; }
|
||||
}
|
||||
@@ -13,10 +13,10 @@ public class Contact
|
||||
[Required] public int ZipCode { get; set; }
|
||||
[Required, MaxLength(100)] public string? City { get; set; }
|
||||
[Required, MaxLength(100)] public string? Role { get; set; }
|
||||
|
||||
|
||||
public Customer? Customer { get; set; }
|
||||
[Required] public int CustomerId { get; set; }
|
||||
|
||||
|
||||
public List<Communication>? Communications { get; set; }
|
||||
public List<StaffContact>? StaffContacts { get; set; }
|
||||
public List<ContactServiceProvider>? ContactServiceProviders { get; set; }
|
||||
|
||||
@@ -8,7 +8,7 @@ public class ContactServiceProvider
|
||||
{
|
||||
[Required] public int ContactId { get; set; }
|
||||
[Required] public int ServiceProviderId { get; set; }
|
||||
|
||||
|
||||
public Contact? Contact { get; set; }
|
||||
public ServiceProvider? ServiceProvider { get; set; }
|
||||
}
|
||||
@@ -6,11 +6,11 @@ public class Customer
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(200)] public string? Note { get; set; }
|
||||
|
||||
|
||||
//Relations
|
||||
[Required] public int CustomerTypeId { get; set; }
|
||||
public CustomerType? CustomerType { get; set; }
|
||||
|
||||
|
||||
public List<Contact>? Contacts { get; set; }
|
||||
public List<Quotation>? Quotations { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,8 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class CustomerType
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
|
||||
public List<Customer>? Customers { get; set; }
|
||||
}
|
||||
@@ -6,6 +6,6 @@ public class Deliverer
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Transporter { get; set; }
|
||||
|
||||
|
||||
public List<DeliveryNote>? DeliveryNotes { get; set; }
|
||||
}
|
||||
@@ -10,7 +10,7 @@ public class DeliveryNote
|
||||
[Required] public DateOnly EstimateDeliveryDate { get; set; }
|
||||
[Required] public DateOnly ExpeditionDate { get; set; }
|
||||
public DateOnly? RealDeliveryDate { get; set; }
|
||||
|
||||
|
||||
public Deliverer? Deliverer { get; set; }
|
||||
public List<ProductDelivery>? ProductDeliveries { get; set; }
|
||||
}
|
||||
@@ -4,8 +4,8 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Effect
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(200)] public string? Label { get; set; }
|
||||
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(200)] public string? Label { get; set; }
|
||||
|
||||
public List<ProductEffect>? ProductEffects { get; set; }
|
||||
}
|
||||
@@ -6,7 +6,7 @@ public class ExperienceLevel
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
|
||||
public Staff? Staff { get; set; }
|
||||
[Required] public int StaffId { get; set; }
|
||||
}
|
||||
@@ -4,9 +4,9 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class HistoryOfApproval
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public DateOnly DeliveryDate { get; set; }
|
||||
[Required] public DateOnly ExpirationDate { get; set; }
|
||||
|
||||
|
||||
public List<StaffHistoryOfApproval>? StaffHistoryOfApprovals { get; set; }
|
||||
}
|
||||
@@ -4,13 +4,13 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Material
|
||||
{
|
||||
[Key] public int Id {get; set;}
|
||||
[Required, MaxLength(100)] public string? Name {get; set;}
|
||||
[Required] public int Quantity {get; set;}
|
||||
|
||||
[Required] public int WarehouseId {get; set;}
|
||||
public Warehouse? Warehouse {get; set;}
|
||||
|
||||
public List<ShowMaterial>? ShowMaterials {get; set;}
|
||||
public List<MaterialWarehouse>? MaterialWarehouses {get; set;}
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
[Required] public int Quantity { get; set; }
|
||||
|
||||
[Required] public int WarehouseId { get; set; }
|
||||
public Warehouse? Warehouse { get; set; }
|
||||
|
||||
public List<ShowMaterial>? ShowMaterials { get; set; }
|
||||
public List<MaterialWarehouse>? MaterialWarehouses { get; set; }
|
||||
}
|
||||
@@ -8,7 +8,7 @@ public class MaterialWarehouse
|
||||
{
|
||||
[Required] public int MaterialId { get; set; }
|
||||
[Required] public int WarehouseId { get; set; }
|
||||
|
||||
|
||||
public Material? Material { get; set; }
|
||||
public Warehouse? Warehouse { get; set; }
|
||||
}
|
||||
@@ -4,16 +4,16 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Movement
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public DateTime Date { get; set; }
|
||||
[Required] public DateTime Start {get; set;}
|
||||
[Required] public DateTime Arrival {get; set;}
|
||||
[Required] public int Quantity {get; set;}
|
||||
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public DateTime Date { get; set; }
|
||||
[Required] public DateTime Start { get; set; }
|
||||
[Required] public DateTime Arrival { get; set; }
|
||||
[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;}
|
||||
|
||||
public int? SourceWarehouseId { get; set; }
|
||||
public Warehouse? SourceWarehouse { get; set; }
|
||||
public int? DestinationWarehouseId { get; set; }
|
||||
public Warehouse? DestinationWarehouse { get; set; }
|
||||
}
|
||||
@@ -10,7 +10,7 @@ public class Price
|
||||
[Required] public int ProductId { get; set; }
|
||||
[Required] public int SupplierId { get; set; }
|
||||
[Required] public decimal SellingPrice { get; set; }
|
||||
|
||||
|
||||
public Product? Product { get; set; }
|
||||
public Supplier? Supplier { get; set; }
|
||||
}
|
||||
@@ -7,7 +7,7 @@ namespace PyroFetes.Models
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(20)] public string? Reference { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
[Required] public decimal Duration {get; set;}
|
||||
[Required] public decimal Duration { get; set; }
|
||||
[Required] public int Caliber { get; set; }
|
||||
[Required, MaxLength(100)] public string? ApprovalNumber { get; set; }
|
||||
[Required] public decimal Weight { get; set; }
|
||||
@@ -22,9 +22,9 @@ namespace PyroFetes.Models
|
||||
|
||||
[Required] public int ProductCategoryId { get; set; }
|
||||
public ProductCategory? ProductCategory { get; set; }
|
||||
|
||||
[Required] public int MovementId {get; set;}
|
||||
public Movement? Movement {get; set;}
|
||||
|
||||
[Required] public int MovementId { get; set; }
|
||||
public Movement? Movement { get; set; }
|
||||
|
||||
public List<ProductDelivery>? ProductDeliveries { get; set; }
|
||||
public List<Brand>? Brands { get; set; }
|
||||
@@ -35,7 +35,5 @@ namespace PyroFetes.Models
|
||||
public List<QuotationProduct>? QuotationProducts { get; set; }
|
||||
public List<WarehouseProduct>? WarehouseProducts { get; set; }
|
||||
public List<ProductTimecode>? ProductTimecodes { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,8 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class ProductCategory
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
public List<Product>? Products { get; set; }
|
||||
}
|
||||
@@ -8,7 +8,7 @@ public class ProductColor
|
||||
{
|
||||
public Product? Product { get; set; }
|
||||
[Required] public int ProductId { get; set; }
|
||||
|
||||
|
||||
public Color? Color { get; set; }
|
||||
[Required] public int ColorId { get; set; }
|
||||
}
|
||||
@@ -9,7 +9,7 @@ public class ProductDelivery
|
||||
[Required] public int ProductId { get; set; }
|
||||
[Required] public int DeliveryNoteId { get; set; }
|
||||
[Required] public int Quantity { get; set; }
|
||||
|
||||
|
||||
public Product? Product { get; set; }
|
||||
public DeliveryNote? DeliveryNote { get; set; }
|
||||
}
|
||||
@@ -11,5 +11,4 @@ public class ProductEffect
|
||||
|
||||
public Effect? Effect { get; set; }
|
||||
[Required] public int EffectId { get; set; }
|
||||
|
||||
}
|
||||
@@ -8,10 +8,10 @@ public class ProductTimecode
|
||||
{
|
||||
public Product? Product { get; set; }
|
||||
[Required] public int ProductId { get; set; }
|
||||
|
||||
|
||||
public Show? Show { get; set; }
|
||||
[Required] public int ShowId { get; set; }
|
||||
|
||||
|
||||
[Required] public decimal Start { get; set; }
|
||||
[Required] public decimal End { get; set; }
|
||||
}
|
||||
@@ -4,8 +4,8 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class ProviderType
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
|
||||
public List<ServiceProvider>? ServiceProviders { get; set; }
|
||||
}
|
||||
@@ -6,7 +6,7 @@ public class PurchaseOrder
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(300)] public string? PurchaseConditions { get; set; }
|
||||
|
||||
|
||||
[Required] public int SupplierId { get; set; }
|
||||
public Supplier? Supplier { get; set; }
|
||||
public List<PurchaseProduct>? PurchaseProducts { get; set; }
|
||||
|
||||
@@ -7,9 +7,9 @@ public class Quotation
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(200)] public string? Message { get; set; }
|
||||
[Required, MaxLength(300)] public string? ConditionsSale { get; set; }
|
||||
|
||||
|
||||
[Required] public int CustomerId { get; set; }
|
||||
public Customer? Customer { get; set; }
|
||||
|
||||
|
||||
public List<QuotationProduct>? QuotationProducts { get; set; }
|
||||
}
|
||||
@@ -8,8 +8,8 @@ public class QuotationProduct
|
||||
{
|
||||
[Required] public int ProductId { get; set; }
|
||||
[Required] public int QuotationId { get; set; }
|
||||
[Required] public int Quantity { get; set; }
|
||||
|
||||
[Required] public int Quantity { get; set; }
|
||||
|
||||
public Product? Product { get; set; }
|
||||
public Quotation? Quotation { get; set; }
|
||||
}
|
||||
@@ -4,13 +4,13 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class ServiceProvider
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public decimal Price { get; set; }
|
||||
|
||||
|
||||
//Relations
|
||||
[Required] public int ProviderTypeId { get; set; }
|
||||
public ProviderType? ProviderType { get; set; }
|
||||
|
||||
|
||||
public List<Contract>? Contracts { get; set; }
|
||||
public List<ContactServiceProvider>? ContactServiceProviders { get; set; }
|
||||
}
|
||||
@@ -9,13 +9,13 @@ public class Show
|
||||
[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; }
|
||||
|
||||
@@ -11,5 +11,4 @@ public class ShowMaterial
|
||||
|
||||
public Material? Material { get; set; }
|
||||
[Required] public int MaterialId { get; set; }
|
||||
|
||||
}
|
||||
@@ -4,6 +4,5 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class ShowServiceProvider
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
|
||||
[Key] public int Id { get; set; }
|
||||
}
|
||||
@@ -12,9 +12,9 @@ public class Sound
|
||||
[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; }
|
||||
}
|
||||
@@ -6,6 +6,6 @@ public class SoundCategory
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string Name { get; set; } = null!;
|
||||
|
||||
|
||||
public List<Sound>? Sounds { get; set; }
|
||||
}
|
||||
@@ -10,7 +10,7 @@ public class SoundTimecode
|
||||
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; }
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public class Staff
|
||||
[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; }
|
||||
|
||||
@@ -9,9 +9,9 @@ public class Supplier
|
||||
[Required, MaxLength(100)] public string? Email { get; set; }
|
||||
[Required, MaxLength(30)] public string? Phone { get; set; }
|
||||
[Required, MaxLength(100)] public string? Address { get; set; }
|
||||
[Required,Length(5,5)] public string? ZipCode { get; set; }
|
||||
[Required, Length(5, 5)] public string? ZipCode { get; set; }
|
||||
[Required, MaxLength(100)] public string? City { get; set; }
|
||||
[Required] public int DeliveryDelay { get; set; }
|
||||
|
||||
|
||||
public List<Price>? Prices { get; set; }
|
||||
}
|
||||
@@ -9,6 +9,6 @@ public class Truck
|
||||
[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; }
|
||||
}
|
||||
@@ -4,19 +4,19 @@ namespace PyroFetes.Models;
|
||||
|
||||
public class Warehouse
|
||||
{
|
||||
[Key] public int Id {get; set;}
|
||||
[Required, MaxLength(100)] public string? Name {get; set;}
|
||||
[Required] public int MaxWeight {get; set;}
|
||||
[Required] public int Current {get; set;}
|
||||
[Required] public int MinWeight {get; set;}
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
[Required] public int MaxWeight { get; set; }
|
||||
[Required] public int Current { get; set; }
|
||||
[Required] public int MinWeight { get; set; }
|
||||
[Required, MaxLength(100)] public string? Address { get; set; }
|
||||
[Required, Length(5,5)] public string? ZipCode { get; set; }
|
||||
[Required, Length(5, 5)] public string? ZipCode { get; set; }
|
||||
[Required, MaxLength(100)] public string? City { get; set; }
|
||||
|
||||
|
||||
public List<WarehouseProduct>? WarehouseProducts { get; set; }
|
||||
|
||||
public List<MaterialWarehouse>? MaterialWarehouses {get; set;}
|
||||
|
||||
|
||||
public List<MaterialWarehouse>? MaterialWarehouses { get; set; }
|
||||
|
||||
public List<Movement>? MovementsSource { get; set; }
|
||||
public List<Movement>? MovementsDestination { get; set; }
|
||||
}
|
||||
@@ -10,6 +10,6 @@ public class WarehouseProduct
|
||||
public Product? Product { get; set; }
|
||||
[Required] public int WarehouseId { get; set; }
|
||||
public Warehouse? Warehouse { get; set; }
|
||||
|
||||
|
||||
[Required] public int Quantity { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user