intégration de la base de donnée commune
This commit is contained in:
13
PF3/Models/.idea/.gitignore
generated
vendored
Normal file
13
PF3/Models/.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/.idea.Models.iml
|
||||
/modules.xml
|
||||
/contentModel.xml
|
||||
/projectSettingsUpdater.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
4
PF3/Models/.idea/encodings.xml
generated
Normal file
4
PF3/Models/.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
|
||||
</project>
|
8
PF3/Models/.idea/indexLayout.xml
generated
Normal file
8
PF3/Models/.idea/indexLayout.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
14
PF3/Models/Availability.cs
Normal file
14
PF3/Models/Availability.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class Availability
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public DateOnly AvailabilityDate { get; set; }
|
||||
[Required] public DateOnly DeliveryDate { get; set; }
|
||||
[Required] public DateOnly ExpirationDate { get; set; }
|
||||
[Required] public DateOnly RenewallDate { get; set; }
|
||||
|
||||
public List<StaffAvailability>? StaffAvailabilities { get; set; }
|
||||
}
|
12
PF3/Models/Brand.cs
Normal file
12
PF3/Models/Brand.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class Brand
|
||||
{
|
||||
[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; }
|
||||
}
|
12
PF3/Models/City.cs
Normal file
12
PF3/Models/City.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class City
|
||||
{
|
||||
[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; }
|
||||
}
|
11
PF3/Models/Classification.cs
Normal file
11
PF3/Models/Classification.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class Classification
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
public List<Product>? Products { get; set; }
|
||||
}
|
11
PF3/Models/Color.cs
Normal file
11
PF3/Models/Color.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class Color
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
public List<ProductColor>? ProductColors { get; set; }
|
||||
}
|
14
PF3/Models/Communication.cs
Normal file
14
PF3/Models/Communication.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class Communication
|
||||
{
|
||||
[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; }
|
||||
}
|
23
PF3/Models/Contact.cs
Normal file
23
PF3/Models/Contact.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class Contact
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? LastName { get; set; }
|
||||
[Required, MaxLength(100)] public string? FirstName { get; set; }
|
||||
[Required, MaxLength(100)] public string? Email { get; set; }
|
||||
[Required, MaxLength(30)] public string? PhoneNumber { get; set; }
|
||||
[Required, MaxLength(100)] public string? Address { get; set; }
|
||||
[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; }
|
||||
}
|
14
PF3/Models/ContactServiceProvider.cs
Normal file
14
PF3/Models/ContactServiceProvider.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ContactId), nameof(ServiceProviderId))]
|
||||
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; }
|
||||
}
|
15
PF3/Models/Contract.cs
Normal file
15
PF3/Models/Contract.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ShowId), nameof(ServiceProviderId))]
|
||||
public class Contract
|
||||
{
|
||||
[Required] public int ShowId { get; set; }
|
||||
[Required] public int ServiceProviderId { get; set; }
|
||||
[Required] public string? TermsAndConditions { get; set; }
|
||||
|
||||
public Show? Show { get; set; }
|
||||
public ServiceProvider? ServiceProvider { get; set; }
|
||||
}
|
16
PF3/Models/Customer.cs
Normal file
16
PF3/Models/Customer.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
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; }
|
||||
}
|
11
PF3/Models/CustomerType.cs
Normal file
11
PF3/Models/CustomerType.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class CustomerType
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
public List<Customer>? Customers { get; set; }
|
||||
}
|
11
PF3/Models/Deliverer.cs
Normal file
11
PF3/Models/Deliverer.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class Deliverer
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Transporter { get; set; }
|
||||
|
||||
public List<DeliveryNote>? DeliveryNotes { get; set; }
|
||||
}
|
16
PF3/Models/DeliveryNote.cs
Normal file
16
PF3/Models/DeliveryNote.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class DeliveryNote
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? TrackingNumber { get; set; }
|
||||
public int DelivererId { get; set; }
|
||||
[Required] public DateOnly EstimateDeliveryDate { get; set; }
|
||||
[Required] public DateOnly ExpeditionDate { get; set; }
|
||||
[Required] public DateOnly RealDeliveryDate { get; set; }
|
||||
|
||||
public Deliverer? Deliverer { get; set; }
|
||||
public List<ProductDelivery>? ProductDeliveries { get; set; }
|
||||
}
|
11
PF3/Models/Effect.cs
Normal file
11
PF3/Models/Effect.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class Effect
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(200)] public string? Label { get; set; }
|
||||
|
||||
public List<ProductEffect>? ProductEffects { get; set; }
|
||||
}
|
12
PF3/Models/ExperienceLevel.cs
Normal file
12
PF3/Models/ExperienceLevel.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
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; }
|
||||
}
|
12
PF3/Models/HistoryOfApproval.cs
Normal file
12
PF3/Models/HistoryOfApproval.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class HistoryOfApproval
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public DateOnly DeliveryDate { get; set; }
|
||||
[Required] public DateOnly ExpirationDate { get; set; }
|
||||
|
||||
public List<StaffHistoryOfApproval>? StaffHistoryOfApprovals { get; set; }
|
||||
}
|
16
PF3/Models/Material.cs
Normal file
16
PF3/Models/Material.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
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;}
|
||||
}
|
14
PF3/Models/MaterialWarehouse.cs
Normal file
14
PF3/Models/MaterialWarehouse.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(MaterialId), nameof(WarehouseId))]
|
||||
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; }
|
||||
}
|
19
PF3/Models/Movement.cs
Normal file
19
PF3/Models/Movement.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
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;}
|
||||
|
||||
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;}
|
||||
}
|
16
PF3/Models/Price.cs
Normal file
16
PF3/Models/Price.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ProductId), nameof(SupplierId))]
|
||||
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; }
|
||||
}
|
42
PF3/Models/Product.cs
Normal file
42
PF3/Models/Product.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public int References { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
[Required] public decimal Duration {get; set;}
|
||||
[Required] public decimal Caliber { get; set; }
|
||||
[Required] public int ApprovalNumber { get; set; }
|
||||
[Required] public decimal Weight { get; set; }
|
||||
[Required] public decimal Nec { get; set; }
|
||||
[Required] public decimal SellingPrice { get; set; }
|
||||
[Required] public string? Image { get; set; }
|
||||
[Required, MaxLength(200)] public string? Link { get; set; }
|
||||
[Required] public int MinimalQuantity { get; set; }
|
||||
|
||||
// Relations
|
||||
[Required] public int ClassificationId { get; set; }
|
||||
public Classification? Classification { get; set; }
|
||||
|
||||
[Required] public int ProductCategoryId { get; set; }
|
||||
public ProductCategory? ProductCategory { 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; }
|
||||
public List<ProductEffect>? ProductEffects { get; set; }
|
||||
public List<ProductColor>? ProductColors { get; set; }
|
||||
public List<PurchaseProduct>? PurchaseProducts { get; set; }
|
||||
public List<Price>? Prices { get; set; }
|
||||
public List<QuotationProduct>? QuotationProducts { get; set; }
|
||||
public List<WarehouseProduct>? WarehouseProducts { get; set; }
|
||||
public List<ProductTimecode>? ProductTimecodes { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
11
PF3/Models/ProductCategory.cs
Normal file
11
PF3/Models/ProductCategory.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class ProductCategory
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
public List<Product>? Products { get; set; }
|
||||
}
|
14
PF3/Models/ProductColor.cs
Normal file
14
PF3/Models/ProductColor.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ProductId), nameof(ColorId))]
|
||||
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; }
|
||||
}
|
15
PF3/Models/ProductDelivery.cs
Normal file
15
PF3/Models/ProductDelivery.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ProductId), nameof(DeliveryNoteId))]
|
||||
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; }
|
||||
}
|
15
PF3/Models/ProductEffect.cs
Normal file
15
PF3/Models/ProductEffect.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ProductId), nameof(EffectId))]
|
||||
public class ProductEffect
|
||||
{
|
||||
[Required] public Product? Product { get; set; }
|
||||
[Required] public int ProductId { get; set; }
|
||||
|
||||
public Effect? Effect { get; set; }
|
||||
[Required] public int EffectId { get; set; }
|
||||
|
||||
}
|
17
PF3/Models/ProductTimecode.cs
Normal file
17
PF3/Models/ProductTimecode.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ProductId), nameof(ShowId))]
|
||||
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; }
|
||||
}
|
12
PF3/Models/ProviderContact.cs
Normal file
12
PF3/Models/ProviderContact.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ContactId), nameof(ProviderId))]
|
||||
public class ProviderContact
|
||||
{
|
||||
public int ProviderId { get; set; }
|
||||
public ServiceProvider? Provider { get; set; }
|
||||
public int ContactId { get; set; }
|
||||
public Contact? Contact { get; set; }
|
||||
}
|
11
PF3/Models/ProviderType.cs
Normal file
11
PF3/Models/ProviderType.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class ProviderType
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Label { get; set; }
|
||||
|
||||
public List<ServiceProvider>? ServiceProviders { get; set; }
|
||||
}
|
11
PF3/Models/PurchaseOrder.cs
Normal file
11
PF3/Models/PurchaseOrder.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class PurchaseOrder
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(300)] public string? PurchaseConditions { get; set; }
|
||||
|
||||
public List<PurchaseProduct>? PurchaseProducts { get; set; }
|
||||
}
|
16
PF3/Models/PurchaseProduct.cs
Normal file
16
PF3/Models/PurchaseProduct.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ProductId), nameof(PurchaseOrderId))]
|
||||
public class PurchaseProduct
|
||||
{
|
||||
public Product? Product { get; set; }
|
||||
[Required] public int ProductId { get; set; }
|
||||
|
||||
public PurchaseOrder? PurchaseOrder { get; set; }
|
||||
[Required] public int PurchaseOrderId { get; set; }
|
||||
|
||||
[Required] public int Quantity { get; set; }
|
||||
}
|
15
PF3/Models/Quotation.cs
Normal file
15
PF3/Models/Quotation.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
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; }
|
||||
}
|
15
PF3/Models/QuotationProduct.cs
Normal file
15
PF3/Models/QuotationProduct.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ProductId), nameof(QuotationId))]
|
||||
public class QuotationProduct
|
||||
{
|
||||
[Required] public int ProductId { get; set; }
|
||||
[Required] public int QuotationId { get; set; }
|
||||
[Required] public int Quantity { get; set; }
|
||||
|
||||
public Product? Product { get; set; }
|
||||
public Quotation? Quotation { get; set; }
|
||||
}
|
16
PF3/Models/ServiceProvider.cs
Normal file
16
PF3/Models/ServiceProvider.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class ServiceProvider
|
||||
{
|
||||
[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; }
|
||||
}
|
10
PF3/Models/Setting.cs
Normal file
10
PF3/Models/Setting.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class Setting
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required] public string? Logo { get; set; }
|
||||
[Required] public string? ElectronicSignature { get; set; }
|
||||
}
|
@@ -1,27 +0,0 @@
|
||||
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> Staff { get; set; } = new List<Staff>();
|
||||
public ICollection<Truck> Trucks { get; set; } = new List<Truck>();
|
||||
public ICollection<SoundTimecode> SoundCues { get; set; } = new List<SoundTimecode>();
|
||||
}
|
15
PF3/Models/ShowMaterial.cs
Normal file
15
PF3/Models/ShowMaterial.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ShowId), nameof(MaterialId))]
|
||||
public class ShowMaterial
|
||||
{
|
||||
[Required] public Show? Show { get; set; }
|
||||
[Required] public int ShowId { get; set; }
|
||||
|
||||
public Material? Material { get; set; }
|
||||
[Required] public int MaterialId { get; set; }
|
||||
|
||||
}
|
9
PF3/Models/ShowServiceProvider.cs
Normal file
9
PF3/Models/ShowServiceProvider.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class ShowServiceProvider
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
|
||||
}
|
14
PF3/Models/ShowStaff.cs
Normal file
14
PF3/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
PF3/Models/ShowTruck.cs
Normal file
14
PF3/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; }
|
||||
}
|
@@ -1,35 +0,0 @@
|
||||
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<SoundTimecode> ShowPlacements { get; set; } = new List<SoundTimecode>();
|
||||
}
|
@@ -1,13 +0,0 @@
|
||||
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<Sound> Sounds { get; set; } = new List<Sound>();
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
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; }
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
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<Show> Shows { get; set; } = new List<Show>();
|
||||
}
|
12
PF3/Models/StaffAvailability.cs
Normal file
12
PF3/Models/StaffAvailability.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(AvailabilityId), nameof(StaffId))]
|
||||
public class StaffAvailability
|
||||
{
|
||||
public int StaffId { get; set; }
|
||||
public Staff? Staff { get; set; }
|
||||
public int AvailabilityId { get; set; }
|
||||
public Availability? Availability { get; set; }
|
||||
}
|
13
PF3/Models/StaffContact.cs
Normal file
13
PF3/Models/StaffContact.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ContactId), nameof(StaffId))]
|
||||
public class StaffContact
|
||||
{
|
||||
[Required] public int StaffId { get; set; }
|
||||
public Staff? Staff { get; set; }
|
||||
[Required] public int ContactId { get; set; }
|
||||
public Contact? Contact { get; set; }
|
||||
}
|
12
PF3/Models/StaffHistoryOfApproval.cs
Normal file
12
PF3/Models/StaffHistoryOfApproval.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(HistoryOfApprovalId), nameof(StaffId))]
|
||||
public class StaffHistoryOfApproval
|
||||
{
|
||||
public int StaffId { get; set; }
|
||||
public Staff? Staff { get; set; }
|
||||
public int HistoryOfApprovalId { get; set; }
|
||||
public HistoryOfApproval? HistoryOfApproval { get; set; }
|
||||
}
|
17
PF3/Models/Supplier.cs
Normal file
17
PF3/Models/Supplier.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class Supplier
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
[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] public int ZipCode { get; set; }
|
||||
[Required, MaxLength(100)] public string? City { get; set; }
|
||||
[Required] public int DeliveryDelay { get; set; }
|
||||
|
||||
public List<Price>? Prices { get; set; }
|
||||
}
|
@@ -1,24 +0,0 @@
|
||||
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; }
|
||||
}
|
13
PF3/Models/User.cs
Normal file
13
PF3/Models/User.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
public class User
|
||||
{
|
||||
[Key] public int Id { get; set; }
|
||||
[Required, MaxLength(100)] public string? Name { get; set; }
|
||||
[Required, MinLength(12), MaxLength(50)] public string? Password { get; set; }
|
||||
[Required, MaxLength(100)] public string? Salt { get; set; }
|
||||
[Required, MaxLength(100)] public string? Email { get; set; }
|
||||
[Required, MaxLength(100)] public string? Fonction { get; set; }
|
||||
}
|
22
PF3/Models/Warehouse.cs
Normal file
22
PF3/Models/Warehouse.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
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;}
|
||||
[Required, MaxLength(100)] public string? Address { get; set; }
|
||||
[Required] public int 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<Movement>? MovementsSource { get; set; }
|
||||
public List<Movement>? MovementsDestination { get; set; }
|
||||
}
|
15
PF3/Models/WarehouseProduct.cs
Normal file
15
PF3/Models/WarehouseProduct.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace PyroFetes.Models;
|
||||
|
||||
[PrimaryKey(nameof(ProductId), nameof(WarehouseId))]
|
||||
public class WarehouseProduct
|
||||
{
|
||||
[Required] public int ProductId { get; set; }
|
||||
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