Ajout du Modèle du sujet 1
This commit is contained in:
13
PyroFetes/Models/.idea/.gitignore
generated
vendored
Normal file
13
PyroFetes/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
PyroFetes/Models/.idea/encodings.xml
generated
Normal file
4
PyroFetes/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
PyroFetes/Models/.idea/indexLayout.xml
generated
Normal file
8
PyroFetes/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>
|
12
PyroFetes/Models/Brand.cs
Normal file
12
PyroFetes/Models/Brand.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using API.Class;
|
||||
|
||||
namespace API.Models;
|
||||
|
||||
public class Brand
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public int ProductId { get; set; }
|
||||
public Product Product { get; set; }
|
||||
}
|
11
PyroFetes/Models/Classification.cs
Normal file
11
PyroFetes/Models/Classification.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using API.Class;
|
||||
|
||||
namespace API.Models;
|
||||
|
||||
public class Classification
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Label { get; set; }
|
||||
|
||||
public List<Product> Products { get; set; }
|
||||
}
|
10
PyroFetes/Models/Color.cs
Normal file
10
PyroFetes/Models/Color.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using API.Class;
|
||||
|
||||
namespace API.Models;
|
||||
|
||||
public class Color
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Label { get; set; }
|
||||
|
||||
}
|
10
PyroFetes/Models/Effect.cs
Normal file
10
PyroFetes/Models/Effect.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using API.Class;
|
||||
|
||||
namespace API.Models;
|
||||
|
||||
public class Effect
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Label { get; set; }
|
||||
|
||||
}
|
13
PyroFetes/Models/Material.cs
Normal file
13
PyroFetes/Models/Material.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using API.Class;
|
||||
|
||||
namespace API.Models;
|
||||
|
||||
public class Material
|
||||
{
|
||||
public int Id {get; set;}
|
||||
public string Name {get; set;}
|
||||
public int Quantity {get; set;}
|
||||
|
||||
public int WarehouseId {get; set;}
|
||||
public Warehouse Warehouse {get; set;}
|
||||
}
|
21
PyroFetes/Models/Movement.cs
Normal file
21
PyroFetes/Models/Movement.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using API.Class;
|
||||
|
||||
namespace API.Models;
|
||||
|
||||
public class Movement
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
public DateTime Start {get; set;}
|
||||
public DateTime Arrival {get; set;}
|
||||
public int Quantity {get; set;}
|
||||
|
||||
public int ProductId {get; set;}
|
||||
public Product Product {get; set;}
|
||||
|
||||
public int? sourceWarehouse {get; set;}
|
||||
public Warehouse SourceWarehouse {get; set;}
|
||||
|
||||
public int? destinationWarehouse {get; set;}
|
||||
public Warehouse DestinationWarehouse {get; set;}
|
||||
}
|
17
PyroFetes/Models/Price.cs
Normal file
17
PyroFetes/Models/Price.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using API.Class;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace API.Models;
|
||||
|
||||
[PrimaryKey(nameof(SupplierId), nameof(ProductId))]
|
||||
public class Price
|
||||
{
|
||||
public decimal Label { get; set; }
|
||||
|
||||
public int SupplierId { get; set; }
|
||||
[Required] public Supplier Supplier { get; set; }
|
||||
|
||||
public int ProductId { get; set; }
|
||||
[Required] public Product Product { get; set; }
|
||||
}
|
31
PyroFetes/Models/Product.cs
Normal file
31
PyroFetes/Models/Product.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using API.Class;
|
||||
|
||||
namespace API.Models
|
||||
{
|
||||
public class Product
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int References { get; set; }
|
||||
public string Name { get; set; }
|
||||
public decimal Duration {get; set;}
|
||||
public decimal Caliber { get; set; }
|
||||
public int ApprovalNumber { get; set; }
|
||||
public decimal Weight { get; set; }
|
||||
public decimal Nec { get; set; }
|
||||
public decimal SellingPrice { get; set; }
|
||||
public string Image { get; set; }
|
||||
public string Link { get; set; }
|
||||
|
||||
// Relations
|
||||
public int ClassificationId { get; set; }
|
||||
public Classification Classification { get; set; }
|
||||
|
||||
public int ProductCategoryId { get; set; }
|
||||
public ProductCategory ProductCategory { get; set; }
|
||||
|
||||
public List<Brand> Brands { get; set; }
|
||||
|
||||
public List<Movement> Movements { get; set; }
|
||||
|
||||
}
|
||||
}
|
11
PyroFetes/Models/ProductCategory.cs
Normal file
11
PyroFetes/Models/ProductCategory.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using API.Class;
|
||||
|
||||
namespace API.Models;
|
||||
|
||||
public class ProductCategory
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Label { get; set; }
|
||||
|
||||
public List<Product> Products { get; set; }
|
||||
}
|
14
PyroFetes/Models/ProductColor.cs
Normal file
14
PyroFetes/Models/ProductColor.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace API.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
PyroFetes/Models/ProductEffect.cs
Normal file
15
PyroFetes/Models/ProductEffect.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace API.Models;
|
||||
|
||||
[PrimaryKey(nameof(ProductId), nameof(EffectId))]
|
||||
public class ProductEffect
|
||||
{
|
||||
public Product? Product { get; set; }
|
||||
[Required] public int ProductId { get; set; }
|
||||
|
||||
public Effect? Effect { get; set; }
|
||||
[Required] public int EffectId { get; set; }
|
||||
|
||||
}
|
15
PyroFetes/Models/Supplier.cs
Normal file
15
PyroFetes/Models/Supplier.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using API.Models;
|
||||
|
||||
namespace API.Class;
|
||||
|
||||
public class Supplier
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string PhoneNumber { get; set; }
|
||||
public string Adress { get; set; }
|
||||
public int ZipCode { get; set; }
|
||||
public string City { get; set; }
|
||||
|
||||
}
|
22
PyroFetes/Models/Warehouse.cs
Normal file
22
PyroFetes/Models/Warehouse.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using API.Models;
|
||||
|
||||
namespace API.Class;
|
||||
|
||||
public class Warehouse
|
||||
{
|
||||
public int Id {get; set;}
|
||||
public string Name {get; set;}
|
||||
public int MaxWeight {get; set;}
|
||||
public int Current {get; set;}
|
||||
public int MinWeight {get; set;}
|
||||
public string Adress { get; set; }
|
||||
public int ZipCode { get; set; }
|
||||
public string City { get; set; }
|
||||
|
||||
|
||||
public List<Material> Materials {get; set;}
|
||||
|
||||
|
||||
public List<Movement> MovementsSource { get; set; }
|
||||
public List<Movement> MovementsDestination { get; set; }
|
||||
}
|
15
PyroFetes/Models/WarehouseProduct.cs
Normal file
15
PyroFetes/Models/WarehouseProduct.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using API.Class;
|
||||
|
||||
namespace API.Models;
|
||||
|
||||
public class WarehouseProduct
|
||||
{
|
||||
public int Quantity { get; set; }
|
||||
|
||||
public int ProductId { get; set; }
|
||||
[Required] public Product Product { get; set; }
|
||||
|
||||
public int WarehouseId { get; set; }
|
||||
[Required] public Warehouse Warehouse { get; set; }
|
||||
}
|
Reference in New Issue
Block a user