diff --git a/.gitignore b/.gitignore
index 9491a2f..b561047 100644
--- a/.gitignore
+++ b/.gitignore
@@ -360,4 +360,5 @@ MigrationBackup/
.ionide/
# Fody - auto-generated XML schema
-FodyWeavers.xsd
\ No newline at end of file
+FodyWeavers.xsd
+/src/backend/DeLong.WebAPI/appsettings.Development.json
diff --git a/src/backend/DeLong.Application/Services/CashWarehouseService.cs b/src/backend/DeLong.Application/Services/CashWarehouseService.cs
index 3a3918d..ebfb734 100644
--- a/src/backend/DeLong.Application/Services/CashWarehouseService.cs
+++ b/src/backend/DeLong.Application/Services/CashWarehouseService.cs
@@ -1,11 +1,11 @@
using AutoMapper;
+using DeLong.Application.Exceptions;
+using DeLong.Application.Interfaces;
using DeLong.Domain.Entities;
+using DeLong.Service.DTOs.CashWarehouse;
using DeLong.Service.Interfaces;
using Microsoft.AspNetCore.Http;
-using DeLong.Application.Exceptions;
-using DeLong.Application.Interfaces;
using Microsoft.EntityFrameworkCore;
-using DeLong.Service.DTOs.CashWarehouse;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Application/Services/CategoryService.cs b/src/backend/DeLong.Application/Services/CategoryService.cs
index 427bc22..56da00b 100644
--- a/src/backend/DeLong.Application/Services/CategoryService.cs
+++ b/src/backend/DeLong.Application/Services/CategoryService.cs
@@ -1,13 +1,13 @@
using AutoMapper;
-using DeLong.Domain.Entities;
-using DeLong.Service.Interfaces;
-using Microsoft.AspNetCore.Http;
-using DeLong.Domain.Configurations;
+using DeLong.Application.DTOs.Categories;
using DeLong.Application.Exceptions;
using DeLong.Application.Extensions;
using DeLong.Application.Interfaces;
+using DeLong.Domain.Configurations;
+using DeLong.Domain.Entities;
+using DeLong.Service.Interfaces;
+using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
-using DeLong.Application.DTOs.Categories;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Application/Services/CustomerService.cs b/src/backend/DeLong.Application/Services/CustomerService.cs
index 1d5815a..2c5ca56 100644
--- a/src/backend/DeLong.Application/Services/CustomerService.cs
+++ b/src/backend/DeLong.Application/Services/CustomerService.cs
@@ -1,13 +1,13 @@
using AutoMapper;
-using DeLong.Domain.Entities;
-using DeLong.Service.Interfaces;
-using Microsoft.AspNetCore.Http;
-using DeLong.Domain.Configurations;
+using DeLong.Application.DTOs.Customers;
using DeLong.Application.Exceptions;
using DeLong.Application.Extensions;
using DeLong.Application.Interfaces;
+using DeLong.Domain.Configurations;
+using DeLong.Domain.Entities;
+using DeLong.Service.Interfaces;
+using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
-using DeLong.Application.DTOs.Customers;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Application/Services/DiscountService.cs b/src/backend/DeLong.Application/Services/DiscountService.cs
index 081d481..4aefc01 100644
--- a/src/backend/DeLong.Application/Services/DiscountService.cs
+++ b/src/backend/DeLong.Application/Services/DiscountService.cs
@@ -1,11 +1,11 @@
using AutoMapper;
+using DeLong.Application.Exceptions;
+using DeLong.Application.Interfaces;
using DeLong.Domain.Entities;
using DeLong.Service.Interfaces;
+using DeLong_Desktop.ApiService.DTOs.Discounts;
using Microsoft.AspNetCore.Http;
-using DeLong.Application.Exceptions;
-using DeLong.Application.Interfaces;
using Microsoft.EntityFrameworkCore;
-using DeLong_Desktop.ApiService.DTOs.Discounts;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Application/Services/EmployeeService.cs b/src/backend/DeLong.Application/Services/EmployeeService.cs
index a86937f..ea19cb2 100644
--- a/src/backend/DeLong.Application/Services/EmployeeService.cs
+++ b/src/backend/DeLong.Application/Services/EmployeeService.cs
@@ -1,10 +1,10 @@
using AutoMapper;
+using DeLong.Application.Exceptions;
+using DeLong.Application.Interfaces;
using DeLong.Domain.Entities;
+using DeLong.Service.DTOs.Employee;
using DeLong.Service.Interfaces;
using Microsoft.AspNetCore.Http;
-using DeLong.Service.DTOs.Employee;
-using DeLong.Application.Exceptions;
-using DeLong.Application.Interfaces;
using Microsoft.EntityFrameworkCore;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Application/Services/KursDollarService.cs b/src/backend/DeLong.Application/Services/KursDollarService.cs
index 197d8e7..628a03f 100644
--- a/src/backend/DeLong.Application/Services/KursDollarService.cs
+++ b/src/backend/DeLong.Application/Services/KursDollarService.cs
@@ -1,11 +1,11 @@
using AutoMapper;
+using DeLong.Application.Exceptions;
+using DeLong.Application.Interfaces;
using DeLong.Domain.Entities;
+using DeLong.Service.DTOs.KursDollar;
using DeLong.Service.Interfaces;
using Microsoft.AspNetCore.Http;
-using DeLong.Application.Exceptions;
-using DeLong.Application.Interfaces;
using Microsoft.EntityFrameworkCore;
-using DeLong.Service.DTOs.KursDollar;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Application/Services/PaymentService.cs b/src/backend/DeLong.Application/Services/PaymentService.cs
index 3f2439f..cb29cb6 100644
--- a/src/backend/DeLong.Application/Services/PaymentService.cs
+++ b/src/backend/DeLong.Application/Services/PaymentService.cs
@@ -1,9 +1,9 @@
using AutoMapper;
+using DeLong.Application.Interfaces;
using DeLong.Domain.Entities;
+using DeLong.Service.DTOs.Payments;
using DeLong.Service.Interfaces;
using Microsoft.AspNetCore.Http;
-using DeLong.Service.DTOs.Payments;
-using DeLong.Application.Interfaces;
using Microsoft.EntityFrameworkCore;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Application/Services/PriceService.cs b/src/backend/DeLong.Application/Services/PriceService.cs
index 2cb3373..0d3c655 100644
--- a/src/backend/DeLong.Application/Services/PriceService.cs
+++ b/src/backend/DeLong.Application/Services/PriceService.cs
@@ -1,12 +1,12 @@
using AutoMapper;
-using DeLong.Domain.Entities;
-using DeLong.Service.Interfaces;
-using Microsoft.AspNetCore.Http;
-using DeLong.Service.DTOs.Prices;
-using DeLong.Domain.Configurations;
using DeLong.Application.Exceptions;
using DeLong.Application.Extensions;
using DeLong.Application.Interfaces;
+using DeLong.Domain.Configurations;
+using DeLong.Domain.Entities;
+using DeLong.Service.DTOs.Prices;
+using DeLong.Service.Interfaces;
+using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Application/Services/ProductService.cs b/src/backend/DeLong.Application/Services/ProductService.cs
index 5ffa05b..74dccdf 100644
--- a/src/backend/DeLong.Application/Services/ProductService.cs
+++ b/src/backend/DeLong.Application/Services/ProductService.cs
@@ -1,13 +1,13 @@
using AutoMapper;
-using DeLong.Domain.Entities;
-using DeLong.Service.Interfaces;
-using Microsoft.AspNetCore.Http;
-using DeLong.Domain.Configurations;
+using DeLong.Application.DTOs.Products;
using DeLong.Application.Exceptions;
using DeLong.Application.Extensions;
using DeLong.Application.Interfaces;
+using DeLong.Domain.Configurations;
+using DeLong.Domain.Entities;
+using DeLong.Service.Interfaces;
+using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
-using DeLong.Application.DTOs.Products;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Application/Services/SaleItemService.cs b/src/backend/DeLong.Application/Services/SaleItemService.cs
index 036410f..5d27e3d 100644
--- a/src/backend/DeLong.Application/Services/SaleItemService.cs
+++ b/src/backend/DeLong.Application/Services/SaleItemService.cs
@@ -1,12 +1,12 @@
using AutoMapper;
-using DeLong.Domain.Entities;
-using DeLong.Domain.Configurations;
using DeLong.Application.Exceptions;
using DeLong.Application.Extensions;
using DeLong.Application.Interfaces;
+using DeLong.Domain.Configurations;
+using DeLong.Domain.Entities;
using DeLong.Service.DTOs.SaleItems;
-using Microsoft.EntityFrameworkCore;
using Microsoft.AspNetCore.Http;
+using Microsoft.EntityFrameworkCore;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Application/Services/TokenService.cs b/src/backend/DeLong.Application/Services/TokenService.cs
index 5fde322..5e24b31 100644
--- a/src/backend/DeLong.Application/Services/TokenService.cs
+++ b/src/backend/DeLong.Application/Services/TokenService.cs
@@ -1,9 +1,9 @@
-using System.Text;
-using System.Security.Claims;
-using DeLong.Service.Interfaces;
+using DeLong.Service.Interfaces;
+using Microsoft.Extensions.Configuration;
using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt;
-using Microsoft.Extensions.Configuration;
+using System.Security.Claims;
+using System.Text;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Application/Services/TransactionItemService.cs b/src/backend/DeLong.Application/Services/TransactionItemService.cs
index 7da9ec5..61e73c3 100644
--- a/src/backend/DeLong.Application/Services/TransactionItemService.cs
+++ b/src/backend/DeLong.Application/Services/TransactionItemService.cs
@@ -1,11 +1,11 @@
using AutoMapper;
+using DeLong.Application.Exceptions;
+using DeLong.Application.Interfaces;
using DeLong.Domain.Entities;
+using DeLong.Service.DTOs.TransactionItems;
using DeLong.Service.Interfaces;
using Microsoft.AspNetCore.Http;
-using DeLong.Application.Exceptions;
-using DeLong.Application.Interfaces;
using Microsoft.EntityFrameworkCore;
-using DeLong.Service.DTOs.TransactionItems;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Application/Services/TransactionService.cs b/src/backend/DeLong.Application/Services/TransactionService.cs
index ac22109..b9d13eb 100644
--- a/src/backend/DeLong.Application/Services/TransactionService.cs
+++ b/src/backend/DeLong.Application/Services/TransactionService.cs
@@ -1,11 +1,11 @@
using AutoMapper;
+using DeLong.Application.DTOs.Transactions;
+using DeLong.Application.Exceptions;
+using DeLong.Application.Interfaces;
using DeLong.Domain.Entities;
using DeLong.Service.Interfaces;
using Microsoft.AspNetCore.Http;
-using DeLong.Application.Exceptions;
-using DeLong.Application.Interfaces;
using Microsoft.EntityFrameworkCore;
-using DeLong.Application.DTOs.Transactions;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Application/Services/UserService.cs b/src/backend/DeLong.Application/Services/UserService.cs
index 0345283..cee7630 100644
--- a/src/backend/DeLong.Application/Services/UserService.cs
+++ b/src/backend/DeLong.Application/Services/UserService.cs
@@ -1,13 +1,13 @@
using AutoMapper;
-using DeLong.Domain.Entities;
-using DeLong.Service.Interfaces;
-using DeLong.Domain.Configurations;
using DeLong.Application.DTOs.Users;
using DeLong.Application.Exceptions;
using DeLong.Application.Extensions;
using DeLong.Application.Interfaces;
-using Microsoft.EntityFrameworkCore;
+using DeLong.Domain.Configurations;
+using DeLong.Domain.Entities;
+using DeLong.Service.Interfaces;
using Microsoft.AspNetCore.Http;
+using Microsoft.EntityFrameworkCore;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Application/Services/WarehouseService.cs b/src/backend/DeLong.Application/Services/WarehouseService.cs
index 22e340b..12f7f83 100644
--- a/src/backend/DeLong.Application/Services/WarehouseService.cs
+++ b/src/backend/DeLong.Application/Services/WarehouseService.cs
@@ -1,13 +1,13 @@
using AutoMapper;
-using DeLong.Domain.Entities;
-using Microsoft.AspNetCore.Http;
-using DeLong.Service.Interfaces;
-using DeLong.Domain.Configurations;
+using DeLong.Application.DTOs.Warehouses;
using DeLong.Application.Exceptions;
using DeLong.Application.Extensions;
using DeLong.Application.Interfaces;
+using DeLong.Domain.Configurations;
+using DeLong.Domain.Entities;
+using DeLong.Service.Interfaces;
+using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
-using DeLong.Application.DTOs.Warehouses;
namespace DeLong.Service.Services;
diff --git a/src/backend/DeLong.Domain/Entities/ReturnProduct.cs b/src/backend/DeLong.Domain/Entities/ReturnProduct.cs
index 641d95e..4824e9f 100644
--- a/src/backend/DeLong.Domain/Entities/ReturnProduct.cs
+++ b/src/backend/DeLong.Domain/Entities/ReturnProduct.cs
@@ -1,4 +1,4 @@
- using DeLong.Domain.Common;
+using DeLong.Domain.Common;
namespace DeLong.Domain.Entities;
@@ -14,7 +14,7 @@ public class ReturnProduct : Auditable
public long ProductId { get; set; }
public string ProductName { get; set; } = string.Empty;
public decimal Quantity { get; set; }
- public string UnitOfMeasure { get; set; } =string.Empty;
+ public string UnitOfMeasure { get; set; } = string.Empty;
public decimal ReturnSumma { get; set; }
public string Reason { get; set; } = string.Empty; // Qaytish sababi
}
diff --git a/src/backend/DeLong.Infrastructure/Migrations/20250224101117_Initial.Designer.cs b/src/backend/DeLong.Infrastructure/Migrations/20250224101117_Initial.Designer.cs
deleted file mode 100644
index 174f868..0000000
--- a/src/backend/DeLong.Infrastructure/Migrations/20250224101117_Initial.Designer.cs
+++ /dev/null
@@ -1,977 +0,0 @@
-//
-using System;
-using DeLong.Infrastructure.Contexts;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-
-#nullable disable
-
-namespace DeLong.Data.Migrations
-{
- [DbContext(typeof(AppDbContext))]
- [Migration("20250224101117_Initial")]
- partial class Initial
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "7.0.20")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
- modelBuilder.Entity("DeLong.Domain.Entities.Asset", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("FileName")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("FilePath")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.ToTable("Assets");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.CashRegister", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.Property("UsdBalance")
- .HasColumnType("numeric");
-
- b.Property("UzpBalance")
- .HasColumnType("numeric");
-
- b.Property("UzsBalance")
- .HasColumnType("numeric");
-
- b.Property("WarehouseId")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.HasIndex("WarehouseId");
-
- b.ToTable("CashRegisters");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Category", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("Description")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.ToTable("Categories");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Customer", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("BankAccount")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("BankName")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("INN")
- .HasColumnType("integer");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("JSHSHIR")
- .HasColumnType("text");
-
- b.Property("MFO")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("OKONX")
- .HasColumnType("text");
-
- b.Property("Phone")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.Property("UserId")
- .HasColumnType("bigint");
-
- b.Property("YurAddress")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("UserId");
-
- b.ToTable("Customers");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Debt", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("DueDate")
- .HasColumnType("timestamp with time zone");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("RemainingAmount")
- .HasColumnType("numeric");
-
- b.Property("SaleId")
- .HasColumnType("bigint");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.HasIndex("SaleId");
-
- b.ToTable("Debts");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.DebtPayment", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("Amount")
- .HasColumnType("numeric");
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("DebtId")
- .HasColumnType("bigint");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("PaymentDate")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.HasIndex("DebtId");
-
- b.ToTable("DebtPayments");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Employee", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("Password")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.Property("UserId")
- .HasColumnType("bigint");
-
- b.Property("Username")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("WarehouseId")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.ToTable("Employees");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.KursDollar", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("AdmissionDollar")
- .HasColumnType("numeric");
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("SellingDollar")
- .HasColumnType("numeric");
-
- b.Property("TodayDate")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.ToTable("KursDollars");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Payment", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("Amount")
- .HasColumnType("numeric");
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("SaleId")
- .HasColumnType("bigint");
-
- b.Property("Type")
- .HasColumnType("integer");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.HasIndex("SaleId");
-
- b.ToTable("Payments");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Price", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CostPrice")
- .HasColumnType("numeric");
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("ProductId")
- .HasColumnType("bigint");
-
- b.Property("Quantity")
- .HasColumnType("numeric");
-
- b.Property("SellingPrice")
- .HasColumnType("numeric");
-
- b.Property("UnitOfMeasure")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.HasIndex("ProductId");
-
- b.ToTable("Prices");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Product", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CategoryId")
- .HasColumnType("bigint");
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("Description")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("IsActive")
- .HasColumnType("boolean");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("MinStockLevel")
- .HasColumnType("numeric");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.HasIndex("CategoryId");
-
- b.ToTable("Products");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Sale", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("CustomerId")
- .HasColumnType("bigint");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("TotalAmount")
- .HasColumnType("numeric");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.Property("UserId")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.HasIndex("CustomerId");
-
- b.HasIndex("UserId");
-
- b.ToTable("Sales");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.SaleItem", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("ProductId")
- .HasColumnType("bigint");
-
- b.Property("Quantity")
- .HasColumnType("numeric");
-
- b.Property("SaleId")
- .HasColumnType("bigint");
-
- b.Property("UnitOfMeasure")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UnitPrice")
- .HasColumnType("numeric");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.HasIndex("ProductId");
-
- b.HasIndex("SaleId");
-
- b.ToTable("SaleItems");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Supplier", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("ContactInfo")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.ToTable("Suppliers");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Transaction", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("CustomerId")
- .HasColumnType("bigint");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("PriceProduct")
- .HasColumnType("numeric");
-
- b.Property("ProductId")
- .HasColumnType("bigint");
-
- b.Property("Quantity")
- .HasColumnType("numeric");
-
- b.Property("SupplierId")
- .HasColumnType("bigint");
-
- b.Property("TransactionType")
- .HasColumnType("integer");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.Property("WarehouseIdFrom")
- .HasColumnType("bigint");
-
- b.Property("WarehouseIdTo")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.HasIndex("CustomerId");
-
- b.HasIndex("ProductId");
-
- b.HasIndex("SupplierId");
-
- b.HasIndex("WarehouseIdFrom");
-
- b.HasIndex("WarehouseIdTo");
-
- b.ToTable("Transactions");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.User", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("Address")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("DateOfBirth")
- .HasColumnType("timestamp with time zone");
-
- b.Property("DateOfExpiry")
- .HasColumnType("timestamp with time zone");
-
- b.Property("DateOfIssue")
- .HasColumnType("timestamp with time zone");
-
- b.Property("FirstName")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Gender")
- .HasColumnType("integer");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("JSHSHIR")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("LastName")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Patronomyc")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Phone")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Role")
- .HasColumnType("integer");
-
- b.Property("SeriaPasport")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("TelegramPhone")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.ToTable("Users");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Warehouse", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("EmployeeId")
- .HasColumnType("bigint");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("Location")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.ToTable("Warehouses");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.CashRegister", b =>
- {
- b.HasOne("DeLong.Domain.Entities.Warehouse", "Warehouse")
- .WithMany("CashRegisters")
- .HasForeignKey("WarehouseId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Warehouse");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Customer", b =>
- {
- b.HasOne("DeLong.Domain.Entities.User", "User")
- .WithMany()
- .HasForeignKey("UserId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("User");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Debt", b =>
- {
- b.HasOne("DeLong.Domain.Entities.Sale", "Sale")
- .WithMany("Debts")
- .HasForeignKey("SaleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Sale");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.DebtPayment", b =>
- {
- b.HasOne("DeLong.Domain.Entities.Debt", "Debt")
- .WithMany("DebtPayments")
- .HasForeignKey("DebtId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Debt");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Payment", b =>
- {
- b.HasOne("DeLong.Domain.Entities.Sale", "Sale")
- .WithMany("Payments")
- .HasForeignKey("SaleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Sale");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Price", b =>
- {
- b.HasOne("DeLong.Domain.Entities.Product", null)
- .WithMany("Prices")
- .HasForeignKey("ProductId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Product", b =>
- {
- b.HasOne("DeLong.Domain.Entities.Category", "Category")
- .WithMany("Products")
- .HasForeignKey("CategoryId")
- .OnDelete(DeleteBehavior.Restrict)
- .IsRequired();
-
- b.Navigation("Category");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Sale", b =>
- {
- b.HasOne("DeLong.Domain.Entities.Customer", "Customer")
- .WithMany()
- .HasForeignKey("CustomerId")
- .OnDelete(DeleteBehavior.Restrict);
-
- b.HasOne("DeLong.Domain.Entities.User", "User")
- .WithMany()
- .HasForeignKey("UserId");
-
- b.Navigation("Customer");
-
- b.Navigation("User");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.SaleItem", b =>
- {
- b.HasOne("DeLong.Domain.Entities.Product", "Product")
- .WithMany()
- .HasForeignKey("ProductId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("DeLong.Domain.Entities.Sale", "Sale")
- .WithMany()
- .HasForeignKey("SaleId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.Navigation("Product");
-
- b.Navigation("Sale");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Transaction", b =>
- {
- b.HasOne("DeLong.Domain.Entities.Customer", "Customer")
- .WithMany()
- .HasForeignKey("CustomerId")
- .OnDelete(DeleteBehavior.Restrict);
-
- b.HasOne("DeLong.Domain.Entities.Product", "Product")
- .WithMany()
- .HasForeignKey("ProductId")
- .OnDelete(DeleteBehavior.Cascade)
- .IsRequired();
-
- b.HasOne("DeLong.Domain.Entities.Supplier", "Supplier")
- .WithMany()
- .HasForeignKey("SupplierId")
- .OnDelete(DeleteBehavior.Restrict);
-
- b.HasOne("DeLong.Domain.Entities.Warehouse", "WarehouseFrom")
- .WithMany()
- .HasForeignKey("WarehouseIdFrom")
- .OnDelete(DeleteBehavior.Restrict);
-
- b.HasOne("DeLong.Domain.Entities.Warehouse", "WarehouseTo")
- .WithMany()
- .HasForeignKey("WarehouseIdTo")
- .OnDelete(DeleteBehavior.Restrict);
-
- b.Navigation("Customer");
-
- b.Navigation("Product");
-
- b.Navigation("Supplier");
-
- b.Navigation("WarehouseFrom");
-
- b.Navigation("WarehouseTo");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Category", b =>
- {
- b.Navigation("Products");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Debt", b =>
- {
- b.Navigation("DebtPayments");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Product", b =>
- {
- b.Navigation("Prices");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Sale", b =>
- {
- b.Navigation("Debts");
-
- b.Navigation("Payments");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Warehouse", b =>
- {
- b.Navigation("CashRegisters");
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/src/backend/DeLong.Infrastructure/Migrations/20250226051725_AddDiscountEntity.Designer.cs b/src/backend/DeLong.Infrastructure/Migrations/20250226051725_AddDiscountEntity.Designer.cs
deleted file mode 100644
index a158c06..0000000
--- a/src/backend/DeLong.Infrastructure/Migrations/20250226051725_AddDiscountEntity.Designer.cs
+++ /dev/null
@@ -1,977 +0,0 @@
-//
-using System;
-using DeLong.Infrastructure.Contexts;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
-
-#nullable disable
-
-namespace DeLong.Data.Migrations
-{
- [DbContext(typeof(AppDbContext))]
- [Migration("20250226051725_AddDiscountEntity")]
- partial class AddDiscountEntity
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "7.0.20")
- .HasAnnotation("Relational:MaxIdentifierLength", 63);
-
- NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
-
- modelBuilder.Entity("DeLong.Domain.Entities.Asset", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("FileName")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("FilePath")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.ToTable("Assets");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.CashRegister", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.Property("UsdBalance")
- .HasColumnType("numeric");
-
- b.Property("UzpBalance")
- .HasColumnType("numeric");
-
- b.Property("UzsBalance")
- .HasColumnType("numeric");
-
- b.Property("WarehouseId")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.HasIndex("WarehouseId");
-
- b.ToTable("CashRegisters");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Category", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("Description")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.ToTable("Categories");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Customer", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("BankAccount")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("BankName")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("INN")
- .HasColumnType("integer");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("JSHSHIR")
- .HasColumnType("text");
-
- b.Property("MFO")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("Name")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("OKONX")
- .HasColumnType("text");
-
- b.Property("Phone")
- .IsRequired()
- .HasColumnType("text");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.Property("UserId")
- .HasColumnType("bigint");
-
- b.Property("YurAddress")
- .IsRequired()
- .HasColumnType("text");
-
- b.HasKey("Id");
-
- b.HasIndex("UserId");
-
- b.ToTable("Customers");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.Debt", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("Id"));
-
- b.Property("CreatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("CreatedBy")
- .HasColumnType("bigint");
-
- b.Property("DueDate")
- .HasColumnType("timestamp with time zone");
-
- b.Property("IsDeleted")
- .HasColumnType("boolean");
-
- b.Property("RemainingAmount")
- .HasColumnType("numeric");
-
- b.Property("SaleId")
- .HasColumnType("bigint");
-
- b.Property("UpdatedAt")
- .HasColumnType("timestamp with time zone");
-
- b.Property("UpdatedBy")
- .HasColumnType("bigint");
-
- b.HasKey("Id");
-
- b.HasIndex("SaleId");
-
- b.ToTable("Debts");
- });
-
- modelBuilder.Entity("DeLong.Domain.Entities.DebtPayment", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("bigint");
-
- NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property