203 Commits

Author SHA1 Message Date
Cristiano f54f5e02dc Last changes before exam 2026-06-09 20:11:33 +02:00
sanchezvem d17f2fb23e Implemented rustfs in app 2026-06-05 11:52:49 +01:00
sanchezvem 697e1431d9 Added validators to managed users 2026-06-01 10:55:32 +01:00
sanchezvem de6a1c5385 Actualiser README.md 2026-05-30 14:25:02 +02:00
sanchezvem 29759cf896 Fixed wwwroot error 2026-05-30 13:44:21 +01:00
sanchezvem f0ad9b536a Changed values of userDto 2026-05-28 15:50:57 +01:00
sanchezvem fb97729c71 Changed values of userDto 2026-05-28 15:41:07 +01:00
sanchezvem 1bd92a8732 Fix route error 2026-05-28 15:39:55 +01:00
sanchezvem 8c38255ed9 Merge remote-tracking branch 'origin/feature/refactor-backend' into feature/refactor-backend
# Conflicts:
#	PyroFetes/Endpoints/Users/GetUserEndpoint.cs
2026-05-28 15:39:04 +01:00
sanchezvem 639631a63b Changed Id value 2026-05-28 15:36:58 +01:00
Cristiano 5869ae18c4 Put roles into endpoints 2026-05-28 15:36:33 +02:00
sanchezvem fc9da89ebe Added refresh token endpoint 2026-05-28 14:05:47 +01:00
sanchezvem 76239b41bd Adapt endpoint to UX 2026-05-27 18:02:03 +01:00
sanchezvem 88882f9db8 Deleted date of delivery note dto 2026-05-27 17:48:30 +01:00
sanchezvem 6339fbdb8c Added spec for see all documents order by desc 2026-05-27 17:23:02 +01:00
sanchezvem 6f2c60e6c0 Fixed error with inclusion in pdf of quotation 2026-05-27 13:12:57 +01:00
sanchezvem cac880e35f Add endpoint to display all customers, and updated dto to create quotation and purchase order 2026-05-27 12:32:27 +01:00
sanchezvem 897b036fc5 fix error 2026-05-26 18:55:54 +01:00
sanchezvem 19c63ef317 Fixed error with update of quantity in stock page 2026-05-26 12:06:15 +01:00
sanchezvem fdaead91ff Changed display of delivery note 2026-05-26 12:01:09 +01:00
sanchezvem aa40ae2e7a Added missing mappings profiles 2026-05-26 11:43:41 +01:00
sanchezvem ed59efe4f8 Added new endpoint to manage warehouse 2026-05-26 11:16:16 +01:00
sanchezvem b13b8ebfb6 Added new endpoint to manage deliveries 2026-05-26 10:53:10 +01:00
sanchezvem 57646a1417 Fix error with spec of product under limit 2026-05-26 10:25:05 +01:00
sanchezvem 3cb619cfa6 Fixed error of display with price of product in all documents 2026-05-25 16:38:33 +01:00
sanchezvem 48b9db6e1c Added SupplierId in DeliveryNote 2026-05-25 16:21:58 +01:00
sanchezvem c0ac9f7a65 Fixed error with setting during conversion of base64 2026-05-25 15:42:23 +01:00
sanchezvem d46fa606b7 Fixed error with creation of document 2026-05-25 12:19:05 +01:00
sanchezvem b59a8b6c3d Added missing field to display price of products on quotation and purchase order 2026-05-25 11:44:18 +01:00
sanchezvem 1ae8072219 Fixed error with documentId 2026-05-25 11:09:01 +01:00
sanchezvem 1434a5d77a Cleaned code 2026-05-24 17:24:44 +01:00
sanchezvem 656100d15e Refactor all code 2026-05-24 17:22:03 +01:00
Cristiano fe58e5e7e7 Firs fixes like price into PDF 2026-03-26 17:23:09 +01:00
Cristiano 9c723a7a10 Merge remote-tracking branch 'origin/develop' into develop 2026-03-26 15:36:28 +01:00
Cristiano 0312f02028 Some fixes 2026-03-26 15:35:11 +01:00
sanchezvem 418c2b3d16 fix error 2025-12-20 15:39:05 +01:00
Cristiano 3487baad87 Added endpoint to get products under their limit 2025-12-18 14:41:45 +01:00
sanchezvem 29e2036965 fix error 2025-12-13 15:34:29 +01:00
sanchezvem be7a3193ab added CreateQuotationEndpoint.cs 2025-12-13 15:08:18 +01:00
sanchezvem 0802ec9e33 new migration 2025-12-13 11:39:56 +01:00
sanchezvem 35d3e58d86 fix error and add CreatePurchaseOrder.cs 2025-12-13 11:24:01 +01:00
sanchezvem 2a42e1010f fix error 2025-12-12 21:57:58 +01:00
sanchezvem 2fa74ccba8 added UpdateQuotationDto.cs 2025-12-12 21:18:13 +01:00
sanchezvem 65cff130e4 update deliverynote endpoint 2025-12-11 17:46:23 +01:00
sanchezvem e21e2afea4 fix error 2025-12-04 17:11:34 +01:00
sanchezvem 17978e7c19 change response in endpoint to generate pdf 2025-12-04 16:38:27 +01:00
sanchezvem 6a20676b32 added showcompagnon 2025-12-04 15:06:36 +01:00
sanchezvem e440dcd2b5 added pdf generation for all orders 2025-12-03 17:41:19 +01:00
sanchezvem bee1cfb0e3 added PDF generation for quotation 2025-12-03 17:00:02 +01:00
sanchezvem d709654410 fix error in GetTotalQuantityEndpoint.cs 2025-11-30 16:59:28 +01:00
sanchezvem 4a82c51133 fixed errors 2025-11-30 15:43:59 +01:00
sanchezvem 8a04adeec3 updated GetSupplierDto.cs 2025-11-30 15:35:08 +01:00
sanchezvem db9219e80f fix error in PatchRealDeliveryDateEndpoint.cs 2025-11-30 14:50:21 +01:00
sanchezvem 9e6834754f added DeleteDeliveryNoteEndpoint.cs 2025-11-30 14:23:30 +01:00
sanchezvem efa7a0be6f added DeleteProductEndpoint.cs 2025-11-29 21:58:20 +01:00
sanchezvem 2a439ccbb5 added mapper 2025-11-28 09:51:12 +01:00
sanchezvem 5c6798a647 fixed errors 2025-11-27 17:24:48 +01:00
Cristiano 50a5f371dd Fixed Database 2025-11-27 14:35:35 +01:00
sanchezvem 86c5d6ae7b new migration 2025-11-27 13:41:55 +01:00
sanchezvem 1c0432a2c4 updated length of password in User.cs 2025-11-27 13:40:02 +01:00
sanchezvem 3e8f36457e fixed errors in database 2025-11-26 20:37:49 +01:00
sanchezvem 5d68ee6992 fix length on approval number 2025-11-26 19:43:54 +01:00
Cristiano d26284d552 Merge branch 'feature/repositories-refactor' into develop 2025-11-20 16:45:55 +01:00
Cristiano d537051bea Fix Type errors 2025-11-20 16:45:44 +01:00
Cristiano 3ad506f869 Retired /api in all the endpoints 2025-11-20 16:33:56 +01:00
Cristiano 9aac7c39f2 Merge branch 'feature/repositories-refactor' into develop
# Conflicts:
#	PyroFetes/Endpoints/Price/CreatePriceEndpoint.cs
#	PyroFetes/Endpoints/Product/GetAllProductsEndpoint.cs
#	PyroFetes/Endpoints/Product/GetProductEndpoint.cs
#	PyroFetes/Endpoints/PurchaseOrder/GetAllPurchaseOrderEndpoint.cs
#	PyroFetes/Endpoints/PurchaseOrder/GetPurchaseOrderEndpoint.cs
#	PyroFetes/Endpoints/Quotation/GetAllQuotationEndpoint.cs
#	PyroFetes/Endpoints/Quotation/GetQuotationEndpoint.cs
#	PyroFetes/Endpoints/SettingEndpoints/CreateSettingEndpoint.cs
#	PyroFetes/Endpoints/SettingEndpoints/PatchSettingElectronicSignatureEndpoint.cs
#	PyroFetes/Endpoints/SettingEndpoints/PatchSettingLogoEndpoint.cs
#	PyroFetes/Endpoints/Supplier/CreateSupplierEndpoint.cs
#	PyroFetes/Endpoints/Supplier/GetAllSuppliersEndpoint.cs
#	PyroFetes/Endpoints/Supplier/GetSupplierEndpoint.cs
#	PyroFetes/Endpoints/Supplier/PatchSupplierDeleveryDelayEndpoint.cs
#	PyroFetes/Endpoints/User/GetAllUsersEndpoint.cs
#	PyroFetes/Endpoints/User/GetUserEndpoint.cs
2025-11-20 16:16:15 +01:00
Cristiano b76b668097 Addapted to use cors and optimized connection with the frontend 2025-11-20 16:12:16 +01:00
Cristiano 669938d677 Refactored WarehouseProduct 2025-11-20 16:09:04 +01:00
Cristiano 165c9b9322 Refactored User 2025-11-20 15:38:53 +01:00
Cristiano 0b72549143 Refactored Program.cs 2025-11-20 15:20:13 +01:00
Cristiano d64890dec9 Refactored Supplier 2025-11-20 15:11:14 +01:00
Cristiano 8325aa0768 Refactored Setting 2025-11-20 15:05:44 +01:00
Cristiano ee9b4675dd Refactored Quotation 2025-11-20 14:34:09 +01:00
Cristiano f6383265ba Refactored QuotationProduct 2025-11-20 14:20:25 +01:00
Cristiano 7bf0b5bfd1 Advanced refactoring 2025-11-20 14:04:13 +01:00
Cristiano bd653c149c Finished refactoring prices endpoints 2025-11-19 18:05:28 +01:00
sanchezvem 0511bb5075 added AllowAnonymous(); 2025-11-17 21:25:07 +01:00
sanchezvem 27e8fea7f3 added AllowAnonymous(); 2025-11-17 21:20:04 +01:00
sanchezvem 6dba61f742 suppr all 'var' and Models.xxx. And added 's' at the end of all directories endpoints 2025-11-17 20:49:12 +01:00
Cristiano 20bbccf883 Added last endpoints for delivery Note 2025-11-14 18:11:54 +01:00
Cristiano d7cf245d35 Committed migration 2025-11-13 17:28:41 +01:00
Cristiano 2385b7b687 Made an update on database and added CreatingDeliveryNotee 2025-11-13 17:28:08 +01:00
Cristiano ae834d1e3c Adapted Price Endpoints 2025-11-13 16:31:00 +01:00
Cristiano c6d4ef2c58 Adapted Deliverer endpoints with repository spec and automapper 2025-11-13 15:26:22 +01:00
Cristiano 60a7c059b4 Merge remote-tracking branch 'origin/develop' into develop 2025-11-13 14:44:46 +01:00
Cristiano 9684dbcbc7 Merged AutoMapper branch 2025-11-13 14:44:28 +01:00
sanchezvem bbd8d3d36a Actualiser PyroFetes/DTO/Price/Request/CreatePriceDto.cs 2025-11-09 18:48:23 +01:00
sanchezvem 7d92f80de3 Actualiser PyroFetes/Endpoints/Price/CreatePriceEndpoint.cs 2025-11-09 18:46:24 +01:00
sanchezvem 304c06ed19 changed setting for SettingEndpoints 2025-11-07 17:45:35 +01:00
sanchezvem 97a7c6811c created product's endpoints 2025-11-07 17:41:50 +01:00
sanchezvem f8b3c51435 fix error on CreatePriceEndpoint.cs 2025-11-06 19:25:35 +01:00
sanchezvem a535f8cfeb fix errors in Price's DTO 2025-11-06 18:51:46 +01:00
sanchezvem 65b5e6afe3 Merge branch 'feature/CreatingProductEnpoints' into develop 2025-11-06 18:42:39 +01:00
sanchezvem 33719b708e Creating of price's endpoints 2025-11-06 18:52:18 +01:00
sanchezvem b00ed36557 Merge remote-tracking branch 'origin/develop' into develop 2025-11-06 17:34:08 +01:00
sanchezvem be0a6a4004 Creating supplier's endpoints 2025-11-06 17:30:03 +01:00
Cristiano 6bc8281a37 AddedAutoMapper 2025-11-06 16:17:35 +01:00
Cristiano 9ff5c038b1 HOTFIX 2025-11-06 16:16:49 +01:00
Cristiano 4bdd8104d8 Fix wrong HTTP method 2025-11-06 16:11:37 +01:00
Cristiano abc843778f Merge branch 'feature/CreatingDelivererEndpoint' into develop 2025-11-06 16:10:38 +01:00
Cristiano c0090da9bd Fix unused imports 2025-11-06 16:08:52 +01:00
Cristiano 554ba9b725 Added all the endpoints needed for Deliverer 2025-11-06 15:54:53 +01:00
sanchezvem 1c898f9144 Merge branch 'feature/UserEndpoints' into develop 2025-10-27 12:56:04 +01:00
sanchezvem 7bb21be0e6 add patch from user for the password 2025-10-27 12:55:25 +01:00
sanchezvem 6a4760fb72 Creation user's endpoints 2025-10-27 12:31:25 +01:00
sanchezvem 06c64a9f3f add token 2025-10-17 16:53:00 +01:00
sanchezvem aa1c98d649 fix error in api's route 2025-10-17 16:47:34 +01:00
sanchezvem fa72c6d777 creating endpoint WareHouseProduct 2025-10-17 16:23:39 +01:00
sanchezvem 59628717d4 rename directory 2025-10-17 15:51:03 +01:00
sanchezvem ff590302e2 Created all endpoints for Quotation and QuotationProduct 2025-10-17 01:05:50 +01:00
sanchezvem 45f6baaac3 created quotation's dtos 2025-10-17 00:13:41 +01:00
sanchezvem ef9740d8ff creating PatchPurchaseOrderPurchaseConditionsEndpoint.cs 2025-10-17 00:04:37 +01:00
sanchezvem 3ada21adae Creating all setting's endpoints 2025-10-16 23:50:00 +01:00
sanchezvem 4f12911263 creating endpoints from PurchaseOrder 2025-10-16 23:28:27 +01:00
sanchezvem 8bd7fadabc Merge branch 'feature/CreatingPurchaseProductEndpoints' into develop 2025-10-16 22:55:09 +01:00
sanchezvem e4e6c1c3f7 creating purchaseproduct's endpoint and fix error in dto 2025-10-16 22:53:14 +01:00
sanchezvem 791eff9256 added 2025-10-16 19:32:31 +01:00
sanchezvem b4502ae562 editing dto from purchaseproduct 2025-10-16 18:48:55 +01:00
sanchezvem 347003c24a updating CreatePurchaseProductEndpoint.cs and GetPurchaseProductDto.cs 2025-10-16 18:40:30 +01:00
sanchezvem 31e69aae1a Creating purchaseproduct's endpoint 2025-10-16 17:53:16 +02:00
sanchezvem 74b5fa6666 editing dto from PurchaseProduct 2025-10-16 17:24:36 +02:00
sanchezvem b79e07dd8b Adding entities from database and migrating 2025-10-13 18:57:45 +01:00
Cristiano 3192d399cc Fixed name of directory Deliverer 2025-10-11 01:41:16 +02:00
Cristiano 37f6460615 Creating DTO of Deliver and fixing some typing errors 2025-10-11 01:38:41 +02:00
Cristiano ecd8883d55 Creating DTO of ProductDelivery with flattening 2025-10-11 01:29:02 +02:00
Cristiano 0209dbfc20 Creating DTO of DeliveryNote with flattening 2025-10-11 01:09:09 +02:00
sanchezvem e773e201bd Merge tag 'EditingDatabase' into develop
Merge into master
2025-10-10 10:46:20 +02:00
sanchezvem e336a50c4e Merge branch 'release/EditingDatabase' 2025-10-10 10:46:02 +02:00
sanchezvem e63be6e1f1 Merge branch 'feature/EditingDatabase' into develop 2025-10-10 10:37:37 +02:00
sanchezvem 5a36c0ff2f Migration 2025-10-10 10:37:13 +02:00
sanchezvem 014646d35c Migration 2025-10-10 10:36:58 +02:00
sanchezvem 8371423b16 Editing Product.cs 2025-10-10 10:35:23 +02:00
sanchezvem f7931fbed6 Merge branch 'feature/CreatingQuotationProductDTO' into develop 2025-10-09 19:12:18 +01:00
sanchezvem feb12b8c3b Merge branch 'feature/CreatingPurchaseProductDTO' into develop 2025-10-09 19:11:30 +01:00
sanchezvem 5ea5edaea6 Merge branch 'feature/CreatingProductDTO' into develop 2025-10-09 19:10:29 +01:00
sanchezvem aa65139b69 Merge branch 'feature/CreatingSupplierDTO' into develop 2025-10-09 19:10:03 +01:00
sanchezvem 9be4fa67e6 Merge branch 'feature/CreatingWareHouseProductDTO' into develop 2025-10-09 19:09:25 +01:00
sanchezvem e69ca1898d delete productsellingprice 2025-10-09 19:06:11 +01:00
sanchezvem 15526d1589 delete productsellingprice 2025-10-09 19:04:22 +01:00
sanchezvem a27cb5cf2a fix an error 2025-10-09 19:03:09 +01:00
sanchezvem ddbd662c2a fix an error in product attribute 2025-10-09 19:02:09 +01:00
sanchezvem 464869e3ca Creating of all price dto 2025-10-09 19:00:55 +01:00
sanchezvem 25d1407bd2 Creating of all product dto 2025-10-09 17:54:28 +02:00
sanchezvem a262fb094c Creating all supplier dto 2025-10-09 17:47:12 +02:00
sanchezvem f0ec7cd4d4 Fix 2025-10-09 17:43:32 +02:00
ikuzenkuna d0f20e08f0 Fix an error in Setting directory 2025-10-09 17:34:46 +02:00
sanchezvem b1d2d3d1a1 Creating all QuotationProductDTO 2025-10-09 17:25:48 +02:00
sanchezvem 64fd223a63 Fix an error in PatchPurchaseProductQuantityDto.cs 2025-10-09 17:09:33 +02:00
sanchezvem 59ddb9f7b2 Creating all WareHouseProduct DTO 2025-10-09 17:08:01 +02:00
sanchezvem 2d42fa1017 Creating all PurchaseProduct DTO 2025-10-09 16:46:22 +02:00
ikuzenkuna b859e53f95 Creating all setting Dto 2025-10-09 16:34:12 +02:00
ikuzenkuna 3cc96c4ebf Creating user Dto 2025-10-09 16:25:04 +02:00
sanchezvem 6a813fc35a Ajouter README.md 2025-10-08 14:44:42 +02:00
sanchezvem a93d399942 Merge branch 'release/V1' 2025-10-08 11:47:34 +01:00
sanchezvem 04cb47802b Merge branch 'feature/migrations' into develop 2025-10-08 11:42:23 +01:00
sanchezvem e4677b1aea Migration added and updated 2025-10-08 11:38:42 +01:00
sanchezvem 268230daea Fix 2025-10-08 11:20:11 +01:00
sanchezvem ad9c8aa42d Fix in ContactServiceProvider.cs 2025-10-08 11:15:25 +01:00
sanchezvem af208c152b Correcting all 2025-10-08 11:13:37 +01:00
sanchezvem 0ddf5d380a Correcting all errors of types, writed, and entities. 2025-10-08 11:10:27 +01:00
sanchezvem af92cdc524 Correcting all type and relations in all entities 2025-10-08 00:03:52 +01:00
sanchezvem 856d8e2733 Correction de toutes les erreurs de relations et d'écritures dans tous 2025-10-07 23:46:57 +01:00
sanchezvem 89be35ecb0 Fixed all relationship and write errors in all entities 2025-10-07 23:28:16 +01:00
sanchezvem 9a5c83161a Exucuting migrations commands 2025-10-07 11:42:04 +02:00
sanchezvem 41b0f1892e Writing relations into customer and contact 2025-10-07 11:37:51 +02:00
sanchezvem 2bbb771635 Writing OnModelCreating in PyroFetesDbContext.cs 2025-10-07 11:00:35 +02:00
sanchezvem 1446fe7b95 Error during migration 2025-10-07 10:20:52 +02:00
sanchezvem 5261446ddb Fix comments in PyroFetesDbContext.cs 2025-10-07 10:04:55 +02:00
sanchezvem cfa2d59c0d Fix french comments 2025-10-07 10:01:41 +02:00
sanchezvem fa353446eb Writing OnModelCreating in PyroFetesDbContext.cs. 2025-10-06 19:35:34 +01:00
sanchezvem f4da74e9e2 Idem 2025-10-06 19:29:45 +01:00
sanchezvem df3b820dea Correcting relations into Movement and Warehouse. 2025-10-06 19:23:20 +01:00
sanchezvem 2d73830c5a Add MinimalQuantity in Product.cs 2025-10-03 17:41:17 +01:00
sanchezvem 5419ca5aa9 Creating all entities in DbSet 2025-10-03 17:24:31 +01:00
sanchezvem 03db82ed49 Merge branch 'feature/subject4' into develop 2025-10-03 16:58:53 +01:00
sanchezvem 65725922f6 Delete Staff.cs 2025-10-03 16:58:36 +01:00
sanchezvem c128cd453d Add F4T2NumberApproval and F4T2ExpirationDate in Staff.css 2025-10-03 16:57:23 +01:00
sanchezvem 52521908b7 Change type of date parameters (string => DateOnly) 2025-10-03 16:53:18 +01:00
sanchezvem 3f1880b702 Merge branch 'feature/Subject3' into develop 2025-10-03 14:54:52 +01:00
sanchezvem df919bf943 Correcting Entities 2025-10-03 14:54:25 +01:00
sanchezvem da0f5fb513 Correcting an error in using EF 2025-10-03 14:46:34 +01:00
sanchezvem 8be7169995 Merge branch 'feature/Sujet1' into develop 2025-10-03 14:44:25 +01:00
sanchezvem 2781f1e80a Change namespace 2025-10-03 14:44:12 +01:00
sanchezvem c4e8b0b2de Deleting Product.cs 2025-10-03 14:42:08 +01:00
sanchezvem f163aa5feb Correcting type error in all string properties 2025-10-03 14:37:27 +01:00
sanchezvem 4cb501fe04 Correcting errors on Entities 2025-10-03 14:35:31 +01:00
sanchezvem 87f92cf382 Merge branch 'feature/EntitiesSubject2' into develop 2025-10-03 14:16:42 +01:00
norguete 9da75d53b9 Actualiser PyroFetes/Models/Movement.cs 2025-10-02 17:37:52 +02:00
carteronm da468f2853 Project4 Adding entities 2025-10-02 17:11:00 +02:00
cernont 6bb86c0ce9 Actualiser PyroFetes/Models/Show.cs 2025-10-02 15:19:38 +02:00
cernont 788ad93327 Actualiser PyroFetes/Models/Truck.cs 2025-10-02 15:01:46 +02:00
cernont 2bbb6c6e78 Actualiser PyroFetes/Models/Staff.cs 2025-10-02 15:01:30 +02:00
cernont c0ee31f4a7 Actualiser PyroFetes/Models/Sound.cs 2025-10-02 15:00:58 +02:00
cernont bb02df6323 Actualiser PyroFetes/Models/Show.cs 2025-10-02 15:00:09 +02:00
cernont 21d3480b19 Entité du sujet 3 avec connections et cardinalités 2025-10-02 14:53:55 +02:00
reignem 964faa0b6b Ajout des Key et Required 2025-10-02 14:43:34 +02:00
reignem 423f4c4a6c Ajout du Modèle du sujet 1 2025-10-02 14:30:54 +02:00
sanchezvem 8416f5af82 Fixed an error in Supplier.cs 2025-09-27 14:07:11 +01:00
sanchezvem a8a6aa4094 Creating of Product entities to resolve error in 4 files. 2025-09-26 16:31:00 +01:00
sanchezvem d3a8ae593e Delete Models for an error 2025-09-26 16:20:55 +01:00
sanchezvem 1078244eeb Creating all entities for subject 2 2025-09-26 16:18:22 +01:00
sanchezvem cd0e4e6431 Creating DbContext and Models repository 2025-09-26 11:09:00 +02:00
sanchezvem 443663d6af Initial commit 2025-09-26 10:40:21 +02:00
304 changed files with 15713 additions and 2384 deletions
+810
View File
@@ -0,0 +1,810 @@
# Created by https://www.toptal.com/developers/gitignore/api/dotnetcore,csharp,visualstudio,rider,jetbrains+all,windows,macos,linux,sonarqube
# Edit at https://www.toptal.com/developers/gitignore?templates=dotnetcore,csharp,visualstudio,rider,jetbrains+all,windows,macos,linux,sonarqube
### Csharp ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
### DotnetCore ###
# .NET Core build folders
bin/
obj/
# Common node modules locations
/node_modules
/wwwroot/node_modules
### JetBrains+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# AWS User-specific
.idea/**/aws.xml
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# SonarLint plugin
.idea/sonarlint/
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### JetBrains+all Patch ###
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.
.idea/*
!.idea/codeStyles
!.idea/runConfigurations
### Linux ###
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### macOS Patch ###
# iCloud generated files
*.icloud
### Rider ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
# AWS User-specific
# Generated files
# Sensitive or high-churn files
# Gradle
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
# Mongo Explorer plugin
# File-based project format
# IntelliJ
# mpeltonen/sbt-idea plugin
# JIRA plugin
# Cursive Clojure plugin
# SonarLint plugin
# Crashlytics plugin (for Android Studio and IntelliJ)
# Editor-based Rest Client
# Android studio 3.1+ serialized cache file
### SonarQube ###
# SonarQube ignore files.
#
# https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Scanner
# Sonar Scanner working directories
.sonar/
.sonarqube/
.scannerwork/
# http://www.sonarlint.org/commandline/
# SonarLint working directories, configuration files (including credentials)
.sonarlint/
### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
# Windows shortcuts
*.lnk
### VisualStudio ###
# User-specific files
# User-specific files (MonoDevelop/Xamarin Studio)
# Mono auto generated files
# Build results
# Visual Studio 2015/2017 cache/options directory
# Uncomment if you have tasks that create the project's static files in wwwroot
# Visual Studio 2017 auto generated files
# MSTest test Results
# NUnit
# Build Results of an ATL Project
# Benchmark Results
# .NET Core
# ASP.NET Scaffolding
# StyleCop
# Files built by Visual Studio
# Chutzpah Test files
# Visual C++ cache files
# Visual Studio profiler
# Visual Studio Trace Files
# TFS 2012 Local Workspace
# Guidance Automation Toolkit
# ReSharper is a .NET coding add-in
# TeamCity is a build add-in
# DotCover is a Code Coverage Tool
# AxoCover is a Code Coverage Tool
# Coverlet is a free, cross platform Code Coverage Tool
# Visual Studio code coverage results
# NCrunch
# MightyMoose
# Web workbench (sass)
# Installshield output folder
# DocProject is a documentation generator add-in
# Click-Once directory
# Publish Web Output
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
# NuGet Packages
# NuGet Symbol Packages
# The packages folder can be ignored because of Package Restore
# except build/, which is used as an MSBuild target.
# Uncomment if necessary however generally it will be regenerated when needed
# NuGet v3's project.json files produces more ignorable files
# Microsoft Azure Build Output
# Microsoft Azure Emulator
# Windows Store app package directories and files
# Visual Studio cache files
# files ending in .cache can be ignored
# but keep track of directories ending in .cache
# Others
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
# RIA/Silverlight projects
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
# SQL Server files
# Business Intelligence projects
# Microsoft Fakes
# GhostDoc plugin setting file
# Node.js Tools for Visual Studio
# Visual Studio 6 build log
# Visual Studio 6 workspace options file
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
# Visual Studio 6 technical files
# Visual Studio LightSwitch build output
# Paket dependency manager
# FAKE - F# Make
# CodeRush personal settings
# Python Tools for Visual Studio (PTVS)
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
# Telerik's JustMock configuration file
# BizTalk build output
# OpenCover UI analysis results
# Azure Stream Analytics local run output
# MSBuild Binary and Structured Log
# NVidia Nsight GPU debugger configuration file
# MFractors (Xamarin productivity tool) working folder
# Local History for Visual Studio
# Visual Studio History (VSHistory) files
# BeatPulse healthcheck temp database
# Backup folder for Package Reference Convert tool in Visual Studio 2017
# Ionide (cross platform F# VS Code tools) working folder
# Fody - auto-generated XML schema
# VS Code files for those working on multiple tools
# Local History for Visual Studio Code
# Windows Installer files from build outputs
# JetBrains Rider
### VisualStudio Patch ###
# Additional files built by Visual Studio
# End of https://www.toptal.com/developers/gitignore/api/dotnetcore,csharp,visualstudio,rider,jetbrains+all,windows,macos,linux,sonarqube
+16
View File
@@ -0,0 +1,16 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PyroFetes", "PyroFetes\PyroFetes.csproj", "{23E11090-EC39-414E-B2A7-FEF96FE729E3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{23E11090-EC39-414E-B2A7-FEF96FE729E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{23E11090-EC39-414E-B2A7-FEF96FE729E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{23E11090-EC39-414E-B2A7-FEF96FE729E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{23E11090-EC39-414E-B2A7-FEF96FE729E3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
@@ -1,7 +0,0 @@
namespace PyroFetes.DTO.Brand.Request;
public class CreateBrandDto
{
public string? Name { get; set; }
}
@@ -1,8 +0,0 @@
namespace PyroFetes.DTO.Brand.Request;
public class UpdateBrandDto
{
public int Id { get; set; }
public string? Name { get; set; }
}
@@ -1,8 +0,0 @@
namespace PyroFetes.DTO.Brand.Response;
public class GetBrandDto
{
public int Id { get; set; }
public string? Name { get; set; }
}
@@ -1,7 +0,0 @@
namespace PyroFetes.DTO.Classification.Request;
public class CreateClassificationDto
{
public string? Label { get; set; }
}
@@ -1,8 +0,0 @@
namespace PyroFetes.DTO.Classification.Request;
public class UpdateClassificationDto
{
public int Id { get; set; }
public string? Label { get; set; }
}
@@ -1,8 +0,0 @@
namespace PyroFetes.DTO.Classification.Response;
public class GetClassificationDto
{
public int Id { get; set; }
public string? Label { get; set; }
}
@@ -1,6 +0,0 @@
namespace PyroFetes.DTO.Color.Request;
public class CreateColorDto
{
public string? Label { get; set; }
}
@@ -1,7 +0,0 @@
namespace PyroFetes.DTO.Color.Request;
public class UpdateColorDto
{
public int Id { get; set; }
public string? Label { get; set; }
}
@@ -1,7 +0,0 @@
namespace PyroFetes.DTO.Color.Response;
public class GetColorDto
{
public int Id { get; set; }
public string? Label { get; set; }
}
@@ -0,0 +1,7 @@
namespace PyroFetes.DTO.Customer.Response;
public class GetCustomerDto
{
public int Id { get; set; }
public string? Note { get; set; }
}
@@ -0,0 +1,6 @@
namespace PyroFetes.DTO.Deliverer.Request;
public class CreateDelivererDto
{
public string? Transporter { get; set; }
}
@@ -0,0 +1,7 @@
namespace PyroFetes.DTO.Deliverer.Request;
public class UpdateDelivererDto
{
public int Id { get; set; }
public string? Transporter { get; set; }
}
@@ -0,0 +1,11 @@
using PyroFetes.DTO.DeliveryNote.Response;
namespace PyroFetes.DTO.Deliverer.Response;
public class GetDelivererDto
{
public int Id { get; set; }
public string? Transporter { get; set; }
public List<GetDeliveryNoteDto>? DeliveryNotes { get; set; }
}
@@ -0,0 +1,11 @@
namespace PyroFetes.DTO.DeliveryNote.Request;
public class CreateDeliveryNoteDto
{
public string? TrackingNumber { get; set; }
public int DelivererId { get; set; }
public int SupplierId { get; set; }
public Dictionary<int, int>? ProductQuantities { get; set; }
}
@@ -0,0 +1,6 @@
namespace PyroFetes.DTO.DeliveryNote.Request;
public class GetDeliveryNotePdfDto
{
public int Id { get; set; }
}
@@ -0,0 +1,7 @@
namespace PyroFetes.DTO.DeliveryNote.Request;
public class PatchDeliveryNoteRealDeliveryDateDto
{
public int Id { get; set; }
public DateOnly RealDeliveryDate { get; set; }
}
@@ -0,0 +1,12 @@
namespace PyroFetes.DTO.DeliveryNote.Request;
public class UpdateDeliveryNoteDto
{
public int Id { get; set; }
public string? TrackingNumber { get; set; }
public DateOnly EstimateDeliveryDate { get; set; }
public DateOnly ExpeditionDate { get; set; }
public DateOnly? RealDeliveryDate { get; set; }
public int DelivererId { get; set; }
}
@@ -0,0 +1,17 @@
using PyroFetes.DTO.ProductDelivery.Response;
namespace PyroFetes.DTO.DeliveryNote.Response;
public class GetDeliveryNoteDto
{
public int Id { get; set; }
public string? TrackingNumber { get; set; }
public DateOnly EstimateDeliveryDate { get; set; }
public DateOnly ExpeditionDate { get; set; }
public DateOnly? RealDeliveryDate { get; set; }
public int DelivererId { get; set; }
public string? DelivererTransporter { get; set; }
public List<GetProductDeliveryDto>? Products { get; set; }
}
@@ -1,6 +0,0 @@
namespace PyroFetes.DTO.Effect.Request;
public class CreateEffectDto
{
public string? Label { get; set; }
}
@@ -1,7 +0,0 @@
namespace PyroFetes.DTO.Effect.Request;
public class UpdateEffectDto
{
public int Id { get; set; }
public string? Label { get; set; }
}
@@ -1,7 +0,0 @@
namespace PyroFetes.DTO.Effect.Response;
public class GetEffectDto
{
public int Id { get; set; }
public string? Label { get; set; }
}
@@ -1,9 +0,0 @@
namespace PyroFetes.DTO.Material.Request;
public class CreateMaterialDto
{
public string? Label { get; set; }
public int Quantity { get; set; }
public int WarehouseId {get; set;}
}
@@ -1,10 +0,0 @@
namespace PyroFetes.DTO.Material.Request;
public class UpdateMaterialDto
{
public int Id { get; set; }
public string? Label { get; set; }
public int Quantity { get; set; }
public int WarehouseId {get; set;}
}
@@ -1,10 +0,0 @@
namespace PyroFetes.DTO.Material.Response;
public class GetMaterialDto
{
public int Id { get; set; }
public string? Label { get; set; }
public int Quantity { get; set; }
public int WarehouseId {get; set;}
}
@@ -1,10 +0,0 @@
namespace API.DTO.Movement.Request;
public class CreateMovementDto
{
public DateTime Date { get; set; }
public DateTime Start {get; set;}
public DateTime Arrival {get; set;}
public int Quantity {get; set;}
}
@@ -1,11 +0,0 @@
namespace API.DTO.Movement.Request;
public class UpdateMovementDto
{
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;}
}
@@ -1,11 +0,0 @@
namespace API.DTO.Movement.Response;
public class GetMovementDto
{
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;}
}
@@ -0,0 +1,8 @@
namespace PyroFetes.DTO.Price.Request;
public class CreatePriceDto
{
public decimal SellingPrice { get; set; }
public int? SupplierId { get; set; }
public int ProductId { get; set; }
}
@@ -0,0 +1,8 @@
namespace PyroFetes.DTO.Price.Request;
public class PatchPriceSellingPriceDto
{
public int ProductId { get; set; }
public int SupplierId { get; set; }
public decimal SellingPrice { get; set; }
}
@@ -0,0 +1,18 @@
namespace PyroFetes.DTO.Price.Response;
public class GetPriceDto
{
public decimal SellingPrice { get; set; }
public int ProductId { get; set; }
public string? ProductReference { get; set; }
public string? ProductName { get; set; }
public decimal ProductDuration { get; set; }
public int ProductCaliber { get; set; }
public string? ProductApprovalNumber { get; set; }
public decimal ProductWeight { get; set; }
public decimal ProductNec { get; set; }
public string? ProductImage { get; set; }
public string? ProductLink { get; set; }
public int ProductMinimalQuantity { get; set; }
}
@@ -1,21 +0,0 @@
using PyroFetes.Models;
namespace PyroFetes.DTO.Product.Request;
public class CreateProductDto
{
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; }
public int ClassificationId { get; set;}
public int ProductCategoryId { get; set; }
}
@@ -0,0 +1,7 @@
namespace PyroFetes.DTO.Product.Request;
public class PatchProductMinimalStockDto
{
public int Id { get; set; }
public int MinimalQuantity { get; set; }
}
@@ -1,20 +1,16 @@
using PyroFetes.Models;
namespace PyroFetes.DTO.Product.Request;
public class UpdateProductDto
{
public int Id { get; set; }
public int Reference { get; set; }
public string? References { get; set; }
public string? Name { get; set; }
public decimal Duration { get; set; }
public decimal Caliber { get; set; }
public int ApprovalNumber { get; set; }
public int Caliber { get; set; }
public string? 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; }
public int ClassificationId { get; set;}
public int ProductCategoryId { get; set; }
public int MinimalQuantity { get; set; }
}
@@ -1,23 +1,16 @@
using PyroFetes.Models;
namespace PyroFetes.DTO.Product.Response;
public class GetProductDto
{
public int Id { get; set; }
public int Reference { get; set; }
public string? References { get; set; }
public string? Name { get; set; }
public decimal Duration { get; set; }
public decimal Caliber { get; set; }
public int ApprovalNumber { get; set; }
public int Caliber { get; set; }
public string? 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; }
public int ClassificationId { get; set;}
public string? ClassificationLabel { get; set; }
public int ProductCategoryId { get; set; }
public string? ProductCategoryLabel { get; set; }
public int MinimalQuantity { get; set; }
}
@@ -1,6 +0,0 @@
namespace API.DTO.ProductCategory.Request;
public class CreateProductCategoryDto
{
public string? Label { get; set; }
}
@@ -1,7 +0,0 @@
namespace API.DTO.ProductCategory.Request;
public class UpdateProductCategoryDto
{
public int Id { get; set; }
public string? Label { get; set; }
}
@@ -1,8 +0,0 @@
namespace API.DTO.ProductCategory.Response;
public class GetProductCategoryDto
{
public int Id { get; set; }
public string? Label { get; set; }
}
@@ -0,0 +1,18 @@
namespace PyroFetes.DTO.ProductDelivery.Response;
public class GetProductDeliveryDto
{
public int ProductId { get; set; }
public string? ProductReference { get; set; }
public string? ProductName { get; set; }
public decimal ProductDuration { get; set; }
public int ProductCaliber { get; set; }
public string? ProductApprovalNumber { get; set; }
public decimal ProductWeight { get; set; }
public decimal ProductNec { get; set; }
public string? ProductImage { get; set; }
public string? ProductLink { get; set; }
public int ProductMinimalQuantity { get; set; }
public int Quantity { get; set; }
}
@@ -0,0 +1,10 @@
using PyroFetes.DTO.PurchaseProduct.Request;
namespace PyroFetes.DTO.PurchaseOrder.Request;
public class CreatePurchaseOrderDto
{
public string? PurchaseConditions { get; set; }
public int SupplierId { get; set; }
public List<CreatePurchaseOrderProductDto>? Products { get; set; }
}
@@ -0,0 +1,6 @@
namespace PyroFetes.DTO.PurchaseOrder.Request;
public class GetPurchaseOrderPdfDto
{
public int Id { get; set; }
}
@@ -0,0 +1,7 @@
namespace PyroFetes.DTO.PurchaseOrder.Request;
public class PatchPurchaseOrderPurchaseConditionsDto
{
public int Id { get; set; }
public string? PurchaseConditions { get; set; }
}
@@ -0,0 +1,12 @@
using PyroFetes.DTO.PurchaseProduct.Response;
namespace PyroFetes.DTO.PurchaseOrder.Response;
public class GetPurchaseOrderDto
{
public int Id { get; set; }
public string? PurchaseConditions { get; set; }
public int SupplierId { get; set; }
public string? SupplierName { get; set; }
public List<GetPurchaseProductDto>? Products { get; set; }
}
@@ -0,0 +1,8 @@
namespace PyroFetes.DTO.PurchaseProduct.Request;
// Pour ajouter les produits lors de la création
public class CreatePurchaseOrderProductDto
{
public int ProductId { get; set; }
public int Quantity { get; set; }
}
@@ -0,0 +1,8 @@
namespace PyroFetes.DTO.PurchaseProduct.Request;
public class CreatePurchaseProductDto
{
public int Quantity { get; set; }
public int ProductId { get; set; }
public int PurchaseOrderId { get; set; }
}
@@ -0,0 +1,8 @@
namespace PyroFetes.DTO.PurchaseProduct.Request;
public class PatchPurchaseProductQuantityDto
{
public int ProductId { get; set; }
public int PurchaseOrderId { get; set; }
public int Quantity { get; set; }
}
@@ -0,0 +1,21 @@
namespace PyroFetes.DTO.PurchaseProduct.Response;
public class GetPurchaseProductDto
{
public int ProductId { get; set; }
public string? ProductReference { get; set; }
public string? ProductName { get; set; }
public decimal ProductDuration { get; set; }
public int ProductCaliber { get; set; }
public string? ProductApprovalNumber { get; set; }
public decimal ProductWeight { get; set; }
public decimal ProductNec { get; set; }
public string? ProductImage { get; set; }
public string? ProductLink { get; set; }
public int ProductMinimalQuantity { get; set; }
public decimal ProductPrice { get; set; }
public int PurchaseOrderId { get; set; }
public int Quantity { get; set; }
}
@@ -0,0 +1,12 @@
using PyroFetes.DTO.QuotationProduct.Request;
namespace PyroFetes.DTO.Quotation.Request;
public class CreateQuotationDto
{
public string? Message { get; set; }
public string? ConditionsSale { get; set; }
public int CustomerId { get; set; }
public int SupplierId { get; set; }
public List<CreateProductQuotationDto>? Products { get; set; }
}
@@ -0,0 +1,6 @@
namespace PyroFetes.DTO.Quotation.Request;
public class GetQuotationPdfDto
{
public int Id { get; set; }
}
@@ -0,0 +1,7 @@
namespace PyroFetes.DTO.Quotation.Request;
public class PatchQuotationConditionsSaleDto
{
public int Id { get; set; }
public string? ConditionsSale { get; set; }
}
@@ -0,0 +1,7 @@
namespace PyroFetes.DTO.Quotation.Request;
public class PatchQuotationMessageDto
{
public int Id { get; set; }
public string? Message { get; set; }
}
@@ -0,0 +1,8 @@
namespace PyroFetes.DTO.Quotation.Request;
public class UpdateQuotationDto
{
public int Id { get; set; }
public string? Message { get; set; }
public string? ConditionsSale { get; set; }
}
@@ -0,0 +1,11 @@
using PyroFetes.DTO.QuotationProduct.Response;
namespace PyroFetes.DTO.Quotation.Response;
public class GetQuotationDto
{
public int Id { get; set; }
public string? Message { get; set; }
public string? ConditionsSale { get; set; }
public List<GetQuotationProductDto>? Products { get; set; }
}
@@ -0,0 +1,8 @@
namespace PyroFetes.DTO.QuotationProduct.Request;
public class AddQuotationProductDto
{
public int Quantity { get; set; }
public int QuotationId { get; set; }
public int ProductId { get; set; }
}
@@ -0,0 +1,7 @@
namespace PyroFetes.DTO.QuotationProduct.Request;
public class CreateProductQuotationDto
{
public int ProductId { get; set; }
public int Quantity { get; set; }
}
@@ -0,0 +1,8 @@
namespace PyroFetes.DTO.QuotationProduct.Request;
public class PatchQuotationProductQuantityDto
{
public int ProductId { get; set; }
public int QuotationId { get; set; }
public int Quantity { get; set; }
}
@@ -0,0 +1,20 @@
namespace PyroFetes.DTO.QuotationProduct.Response;
public class GetQuotationProductDto
{
public int Quantity { get; set; }
public int ProductId { get; set; }
public string? ProductReference { get; set; }
public string? ProductName { get; set; }
public decimal ProductDuration { get; set; }
public int ProductCaliber { get; set; }
public string? ProductApprovalNumber { get; set; }
public decimal ProductWeight { get; set; }
public decimal ProductNec { get; set; }
public string? ProductImage { get; set; }
public string? ProductLink { get; set; }
public int ProductMinimalQuantity { get; set; }
public decimal ProductPrice { get; set; }
public int QuotationId { get; set; }
}
@@ -0,0 +1,6 @@
namespace PyroFetes.DTO.Refresh.Request;
public class RefreshTokenDto
{
public string? Token { get; set; }
}
@@ -0,0 +1,6 @@
namespace PyroFetes.DTO.Refresh.Response;
public class GetRefreshTokenDto
{
public string? Token { get; set; }
}
@@ -0,0 +1,7 @@
namespace PyroFetes.DTO.SettingDTO.Request;
public class CreateSettingDto
{
public IFormFile? ElectronicSignature { get; set; }
public IFormFile? Logo { get; set; }
}
@@ -0,0 +1,6 @@
namespace PyroFetes.DTO.SettingDTO.Request;
public class PatchSettingElectronicSignatureDto
{
public IFormFile? ElectronicSignature { get; set; }
}
@@ -0,0 +1,6 @@
namespace PyroFetes.DTO.SettingDTO.Request;
public class PatchSettingLogoDto
{
public IFormFile? Logo { get; set; }
}
@@ -0,0 +1,8 @@
namespace PyroFetes.DTO.SettingDTO.Response;
public class GetSettingDto
{
public int Id { get; set; }
public string? ElectronicSignature { get; set; }
public string? Logo { get; set; }
}
@@ -1,11 +1,12 @@
namespace API.DTO.Supplier.Request;
namespace PyroFetes.DTO.Supplier.Request;
public class CreateSupplierDto
{
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; }
public string? Name { get; set; }
public string? Email { get; set; }
public string? Phone { get; set; }
public string? Address { get; set; }
public string? ZipCode { get; set; }
public string? City { get; set; }
public int DeliveryDelay { get; set; }
}
@@ -0,0 +1,7 @@
namespace PyroFetes.DTO.Supplier.Request;
public class PatchSupplierDeliveryDelayDto
{
public int Id { get; set; }
public int DeliveryDelay { get; set; }
}
@@ -1,12 +1,13 @@
namespace API.DTO.Supplier.Request;
namespace PyroFetes.DTO.Supplier.Request;
public class UpdateSupplierDto
{
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; }
public string? Name { get; set; }
public string? Email { get; set; }
public string? Phone { get; set; }
public string? Address { get; set; }
public string? ZipCode { get; set; }
public string? City { get; set; }
public int DeliveryDelay { get; set; }
}
@@ -1,12 +1,16 @@
namespace API.DTO.Supplier.Response;
using PyroFetes.DTO.Price.Response;
namespace PyroFetes.DTO.Supplier.Response;
public class GetSupplierDto
{
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; }
public string? Name { get; set; }
public string? Email { get; set; }
public string? Phone { get; set; }
public string? Address { get; set; }
public string? ZipCode { get; set; }
public string? City { get; set; }
public int DeliveryDelay { get; set; }
public List<GetPriceDto>? Prices { get; set; }
}
@@ -0,0 +1,7 @@
namespace PyroFetes.DTO.User.Request;
public class ConnectUserDto
{
public string? Name { get; set; }
public string? Password { get; set; }
}
@@ -0,0 +1,9 @@
namespace PyroFetes.DTO.User.Request;
public class CreateUserDto
{
public string? Name { get; set; }
public string? Password { get; set; }
public string? Fonction { get; set; }
public string? Email { get; set; }
}
@@ -0,0 +1,7 @@
namespace PyroFetes.DTO.User.Request;
public class PatchUserPasswordDto
{
public int Id { get; set; }
public string? Password { get; set; }
}
@@ -0,0 +1,10 @@
namespace PyroFetes.DTO.User.Request;
public class UpdateUserDto
{
public int Id { get; set; }
public string? Name { get; set; }
public string? Password { get; set; }
public string? Fonction { get; set; }
public string? Email { get; set; }
}
@@ -0,0 +1,6 @@
namespace PyroFetes.DTO.User.Response;
public class GetTokenDto
{
public string? Token { get; set; }
}
+10
View File
@@ -0,0 +1,10 @@
namespace PyroFetes.DTO.User.Response;
public class GetUserDto
{
public int Id { get; set; }
public string? Name { get; set; }
public string? Password { get; set; }
public string? Fonction { get; set; }
public string? Email { get; set; }
}
@@ -0,0 +1,7 @@
namespace PyroFetes.DTO.WareHouse.Response;
public class GetWareHouseDto
{
public int Id { get; set; }
public string? Name { get; set; }
}
@@ -0,0 +1,8 @@
namespace PyroFetes.DTO.WareHouseProduct.Request;
public class PatchWareHouseProductQuantityDto
{
public int WareHouseId { get; set; }
public int ProductId { get; set; }
public int Quantity { get; set; }
}
@@ -0,0 +1,7 @@
namespace PyroFetes.DTO.WareHouseProduct.Response;
public class GetTotalQuantityDto
{
public int ProductId { get; set; }
public int TotalQuantity { get; set; }
}
@@ -0,0 +1,8 @@
namespace PyroFetes.DTO.WareHouseProduct.Response;
public class GetWareHouseProductDto
{
public int Quantity { get; set; }
public int WareHouseId { get; set; }
public int ProductId { get; set; }
}
@@ -1,12 +0,0 @@
namespace API.DTO.Warehouse.Request;
public class CreateWarehouseDto
{
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; }
}
@@ -1,13 +0,0 @@
namespace API.DTO.Warehouse.Request;
public class UpdateWarehouseDto
{
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; }
}
@@ -1,13 +0,0 @@
namespace API.DTO.Warehouse.Response;
public class GetWarehouseDto
{
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; }
}
@@ -1,35 +0,0 @@
using PyroFetes.DTO.Brand.Request;
using PyroFetes.DTO.Brand.Response;
using FastEndpoints;
namespace PyroFetes.Endpoints.Brand;
public class CreateBrandEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint<CreateBrandDto, GetBrandDto>
{
public override void Configure()
{
Post("/api/brands");
AllowAnonymous();
}
public override async Task HandleAsync(CreateBrandDto req, CancellationToken ct)
{
Models.Brand brand = new ()
{
Name = req.Name
};
pyrofetesdbcontext.Brands.Add(brand);
await pyrofetesdbcontext.SaveChangesAsync(ct);
Console.WriteLine("Marque créé avec succès !");
GetBrandDto responseDto = new ()
{
Name = req.Name
};
await Send.OkAsync(responseDto, ct);
}
}
@@ -1,38 +0,0 @@
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Endpoints.Brand;
public class DeleteBrandRequest
{
public int Id { get; set; }
}
public class DeleteBrandEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint<DeleteBrandRequest>
{
public override void Configure()
{
Delete("/api/brands/{@id}", x => new { x.Id });
AllowAnonymous();
}
public override async Task HandleAsync(DeleteBrandRequest req, CancellationToken ct)
{
Models.Brand? brandToDelete = await pyrofetesdbcontext
.Brands
.SingleOrDefaultAsync(a => a.Id == req.Id, cancellationToken: ct);
if (brandToDelete == null)
{
Console.WriteLine($"Aucune marque avec l'ID {req.Id} trouvé.");
await Send.NotFoundAsync(ct);
return;
}
pyrofetesdbcontext.Brands.Remove(brandToDelete);
await pyrofetesdbcontext.SaveChangesAsync(ct);
await Send.NoContentAsync(ct);
}
}
@@ -1,28 +0,0 @@
using PyroFetes.DTO.Brand.Response;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Endpoints.Brand;
public class GetAllBrandsEndpoint(PyroFetesDbContext pyrofetesdbcontext) : EndpointWithoutRequest<List<GetBrandDto>>
{
public override void Configure()
{
Get("/api/brands");
AllowAnonymous();
}
public override async Task HandleAsync(CancellationToken ct)
{
List<GetBrandDto> responseDto = await pyrofetesdbcontext.Brands
.Select(a => new GetBrandDto
{
Id = a.Id,
Name = a.Name,
}
).ToListAsync(ct);
await Send.OkAsync(responseDto, ct);
}
}
@@ -1,42 +0,0 @@
using PyroFetes.DTO.Brand.Response;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Endpoints.Brand;
public class GetBrandRequest
{
public int Id { get; set; }
}
public class GetBrandEndpoint(PyroFetesDbContext pyrofetesdbcontext) :Endpoint<GetBrandRequest, GetBrandDto>
{
public override void Configure()
{
Get("/api/brands/{@id}", x => new { x.Id });
AllowAnonymous();
}
public override async Task HandleAsync(GetBrandRequest req, CancellationToken ct)
{
Models.Brand? brand = await pyrofetesdbcontext
.Brands
.SingleOrDefaultAsync(a => a.Id == req.Id, cancellationToken: ct);
if (brand == null)
{
Console.WriteLine($"Aucune marque avec l'ID {req.Id} trouvé.");
await Send.NotFoundAsync(ct);
return;
}
GetBrandDto responseDto = new()
{
Id = req.Id,
Name = brand.Name
};
await Send.OkAsync(responseDto, ct);
}
}
@@ -1,34 +0,0 @@
using PyroFetes.DTO.Brand.Request;
using PyroFetes.DTO.Brand.Response;
using FastEndpoints;
namespace PyroFetes.Endpoints.Brand;
public class UpdateBrandEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint<UpdateBrandDto, GetBrandDto>
{
public override void Configure()
{
Post("/api/brands");
AllowAnonymous();
}
public override async Task HandleAsync(UpdateBrandDto req, CancellationToken ct)
{
Models.Brand brand = new()
{
Name = req.Name
};
pyrofetesdbcontext.Add(brand);
await pyrofetesdbcontext.SaveChangesAsync(ct);
GetBrandDto response = new()
{
Id = req.Id,
Name = req.Name
};
await Send.OkAsync(response, ct);
}
}
@@ -1,35 +0,0 @@
using PyroFetes.DTO.Classification.Request;
using PyroFetes.DTO.Classification.Response;
using FastEndpoints;
namespace PyroFetes.Endpoints.Classification;
public class CreateClassificationEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint<CreateClassificationDto, GetClassificationDto>
{
public override void Configure()
{
Post("/api/classifications");
AllowAnonymous();
}
public override async Task HandleAsync(CreateClassificationDto req, CancellationToken ct)
{
Models.Classification classification = new ()
{
Label = req.Label
};
pyrofetesdbcontext.Classifications.Add(classification);
await pyrofetesdbcontext.SaveChangesAsync(ct);
Console.WriteLine("Classification créée avec succès !");
GetClassificationDto responseDto = new ()
{
Label = req.Label
};
await Send.OkAsync(responseDto, ct);
}
}
@@ -1,38 +0,0 @@
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Endpoints.Classification;
public class DeleteClassificationRequest
{
public int Id { get; set; }
}
public class DeleteClassificationEndpoint(PyroFetesDbContext libraryDbContext) : Endpoint<DeleteClassificationRequest>
{
public override void Configure()
{
Delete("/api/classifications/{@id}", x => new { x.Id });
AllowAnonymous();
}
public override async Task HandleAsync(DeleteClassificationRequest req, CancellationToken ct)
{
Models.Classification? classificationToDelete = await libraryDbContext
.Classifications
.SingleOrDefaultAsync(a => a.Id == req.Id, cancellationToken: ct);
if (classificationToDelete == null)
{
Console.WriteLine($"Aucune classification avec l'ID {req.Id} trouvé.");
await Send.NotFoundAsync(ct);
return;
}
libraryDbContext.Classifications.Remove(classificationToDelete);
await libraryDbContext.SaveChangesAsync(ct);
await Send.NoContentAsync(ct);
}
}
@@ -1,28 +0,0 @@
using PyroFetes.DTO.Classification.Response;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Endpoints.Classification;
public class GetAllClassificationsEndpoint(PyroFetesDbContext pyrofetesdbcontext) : EndpointWithoutRequest<List<GetClassificationDto>>
{
public override void Configure()
{
Get("/api/classifications");
AllowAnonymous();
}
public override async Task HandleAsync(CancellationToken ct)
{
List<GetClassificationDto> responseDto = await pyrofetesdbcontext.Classifications
.Select(a => new GetClassificationDto
{
Id = a.Id,
Label = a.Label,
}
).ToListAsync(ct);
await Send.OkAsync(responseDto, ct);
}
}
@@ -1,42 +0,0 @@
using PyroFetes.DTO.Classification.Response;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Endpoints.Classification;
public class GetClassificationRequest
{
public int Id { get; set; }
}
public class GetClassificationEndpoint(PyroFetesDbContext pyrofetesdbcontext) :Endpoint<GetClassificationRequest, GetClassificationDto>
{
public override void Configure()
{
Get("/api/classifications/{@id}", x => new { x.Id });
AllowAnonymous();
}
public override async Task HandleAsync(GetClassificationRequest req, CancellationToken ct)
{
Models.Classification? classification = await pyrofetesdbcontext
.Classifications
.SingleOrDefaultAsync(a => a.Id == req.Id, cancellationToken: ct);
if (classification == null)
{
Console.WriteLine($"Aucune classification avec l'ID {req.Id} trouvé.");
await Send.NotFoundAsync(ct);
return;
}
GetClassificationDto responseDto = new()
{
Id = req.Id,
Label = classification.Label
};
await Send.OkAsync(responseDto, ct);
}
}
@@ -1,34 +0,0 @@
using PyroFetes.DTO.Classification.Request;
using PyroFetes.DTO.Classification.Response;
using FastEndpoints;
namespace PyroFetes.Endpoints.Classification;
public class UpdateClassificationEndpoint(PyroFetesDbContext pyrofetesdbcontext) : Endpoint<UpdateClassificationDto, GetClassificationDto>
{
public override void Configure()
{
Post("/api/classifications");
AllowAnonymous();
}
public override async Task HandleAsync(UpdateClassificationDto req, CancellationToken ct)
{
Models.Classification classification = new()
{
Label = req.Label
};
pyrofetesdbcontext.Add(classification);
await pyrofetesdbcontext.SaveChangesAsync(ct);
GetClassificationDto response = new()
{
Id = req.Id,
Label = req.Label
};
await Send.OkAsync(response, ct);
}
}
@@ -1,35 +0,0 @@
using PyroFetes.DTO.Color.Request;
using PyroFetes.DTO.Color.Response;
using FastEndpoints;
namespace PyroFetes.Endpoints.Color;
public class CreateColorEndpoint(PyroFetesDbContext appDbContext) : Endpoint<CreateColorDto, GetColorDto>
{
public override void Configure()
{
Post("/api/color/create");
AllowAnonymous();
}
public override async Task HandleAsync(CreateColorDto req, CancellationToken ct)
{
Models.Color color = new()
{
Label = req.Label,
};
appDbContext.Colors.Add(color);
await appDbContext.SaveChangesAsync(ct);
Console.WriteLine("Added Color");
GetColorDto responseDto = new()
{
Id = color.Id,
Label = req.Label,
};
await Send.OkAsync(responseDto, ct);
}
}
@@ -1,37 +0,0 @@
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Endpoints.Color;
public class DeleteColorRequest
{
public int Id { get; set; }
}
public class DeleteColorEndpoint(PyroFetesDbContext appDbContext) : Endpoint<DeleteColorRequest>
{
public override void Configure()
{
Delete("/api/colors/{@id}", x => new { x.Id });
AllowAnonymous();
}
public override async Task HandleAsync(DeleteColorRequest req, CancellationToken ct)
{
Models.Color? colorToDelete = await appDbContext
.Colors
.SingleOrDefaultAsync(a => a.Id == req.Id, cancellationToken: ct);
if (colorToDelete == null)
{
Console.WriteLine($"Aucune couleur avec l'ID {req.Id} trouvé.");
await Send.NotFoundAsync(ct);
return;
}
appDbContext.Colors.Remove(colorToDelete);
await appDbContext.SaveChangesAsync(ct);
await Send.NoContentAsync(ct);
}
}
@@ -1,26 +0,0 @@
using PyroFetes.DTO.Color.Response;
using FastEndpoints;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Endpoints.Color;
public class GetAllColorsEndpoint(PyroFetesDbContext appDbContext) : EndpointWithoutRequest<List<GetColorDto>>
{
public override void Configure()
{
Get("/api/colors");
AllowAnonymous();
}
public override async Task HandleAsync(CancellationToken ct)
{
List<GetColorDto> responseDto = await appDbContext.Colors
.Select(a => new GetColorDto
{
Id = a.Id,
Label = a.Label,
}
).ToListAsync(ct);
await Send.OkAsync(responseDto, ct);
}
}
@@ -1,42 +0,0 @@
using PyroFetes.DTO.Color.Response;
using FastEndpoints;
using Microsoft.AspNetCore.Authentication;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Endpoints.Color;
public class GetColorRequest
{
public int Id { get; set; }
}
public class GetColorEndpoint(PyroFetesDbContext appDbContext) : Endpoint<GetColorRequest, GetColorDto>
{
public override void Configure()
{
Get("/api/colors/{@id}", x => new { x.Id});
AllowAnonymous();
}
public override async Task HandleAsync(GetColorRequest req, CancellationToken ct)
{
Models.Color? color = await appDbContext
.Colors
.SingleOrDefaultAsync(x => x.Id == req.Id, cancellationToken: ct);
if (color == null)
{
Console.WriteLine($"Aucune couleur avec l'ID {req.Id} trouvé.");
await Send.NotFoundAsync(ct);
return;
}
GetColorDto responseDto = new()
{
Id = color.Id,
Label = color.Label,
};
await Send.OkAsync(responseDto, ct);
}
}
@@ -1,42 +0,0 @@
using PyroFetes.DTO.Color.Request;
using PyroFetes.DTO.Color.Response;
using FastEndpoints;
using Microsoft.AspNetCore.Server.Kestrel;
using Microsoft.EntityFrameworkCore;
namespace PyroFetes.Endpoints.Color;
public class UpdateColorEndpoint(PyroFetesDbContext appDbContext) : Endpoint<UpdateColorDto, GetColorDto>
{
public override void Configure()
{
Put("/api/colors/{@id}", x => new { x.Id });
AllowAnonymous();
}
public override async Task HandleAsync(UpdateColorDto req, CancellationToken ct)
{
Models.Color? colorToEdit = await appDbContext
.Colors
.SingleOrDefaultAsync(x => x.Id == req.Id, cancellationToken: ct);
if (colorToEdit == null)
{
Console.WriteLine($"Aucune couleur avec l'id {req.Id} trouvé.");
await Send.NotFoundAsync(ct);
return;
}
colorToEdit.Label = req.Label;
await appDbContext.SaveChangesAsync(ct);
GetColorDto responseDto = new()
{
Id = req.Id,
Label = req.Label,
};
await Send.OkAsync(responseDto, ct);
}
}
@@ -0,0 +1,19 @@
using FastEndpoints;
using PyroFetes.DTO.Customer.Response;
using PyroFetes.Repositories;
namespace PyroFetes.Endpoints.Customers;
public class GetAllCustomersEndpoint(CustomersRepository customersRepository, AutoMapper.IMapper mapper) : EndpointWithoutRequest<List<GetCustomerDto>>
{
public override void Configure()
{
Get("/customers");
Roles("Admin","Employe");
}
public override async Task HandleAsync(CancellationToken ct)
{
await Send.OkAsync(await customersRepository.ProjectToListAsync<GetCustomerDto>(ct), ct);
}
}
@@ -0,0 +1,27 @@
using FastEndpoints;
using PyroFetes.DTO.Deliverer.Request;
using PyroFetes.DTO.Deliverer.Response;
using PyroFetes.Models;
using PyroFetes.Repositories;
namespace PyroFetes.Endpoints.Deliverers;
public class CreateDelivererEndpoint(DeliverersRepository deliverersRepository) : Endpoint<CreateDelivererDto, GetDelivererDto>
{
public override void Configure()
{
Post("/deliverers");
Roles("Admin","Employe");
}
public override async Task HandleAsync(CreateDelivererDto req, CancellationToken ct)
{
Deliverer newDeliverer = new()
{
Transporter = req.Transporter,
};
await deliverersRepository.AddAsync(newDeliverer, ct);
await Send.NoContentAsync(ct);
}
}
@@ -0,0 +1,34 @@
using FastEndpoints;
using PyroFetes.Models;
using PyroFetes.Repositories;
using PyroFetes.Specifications.Deliverers;
namespace PyroFetes.Endpoints.Deliverers;
public class DeleteDelivererRequest
{
public int DelivererId { get; set; }
}
public class DeleteDelivererEndpoint(DeliverersRepository deliverersRepository) : Endpoint<DeleteDelivererRequest>
{
public override void Configure()
{
Delete("/deliverers/{@Id}", x => new { x.DelivererId });
Roles("Admin");
}
public override async Task HandleAsync(DeleteDelivererRequest req, CancellationToken ct)
{
Deliverer? deliverer = await deliverersRepository.SingleOrDefaultAsync(new GetDelivererByIdSpec(req.DelivererId), ct);
if (deliverer is null)
{
await Send.NotFoundAsync(ct);
return;
}
await deliverersRepository.DeleteAsync(deliverer, ct);
await Send.NoContentAsync(ct);
}
}
@@ -0,0 +1,19 @@
using FastEndpoints;
using PyroFetes.DTO.Deliverer.Response;
using PyroFetes.Repositories;
namespace PyroFetes.Endpoints.Deliverers;
public class GetAllDelivererEndpoint(DeliverersRepository deliverersRepository) : EndpointWithoutRequest<List<GetDelivererDto>>
{
public override void Configure()
{
Get("/deliverers");
Roles("Admin","Employe");
}
public override async Task HandleAsync(CancellationToken ct)
{
await Send.OkAsync(await deliverersRepository.ProjectToListAsync<GetDelivererDto>(ct), ct);
}
}

Some files were not shown because too many files have changed in this diff Show More