This commit is contained in:
masoodafar-web
2025-11-12 20:30:53 +03:30
parent 4b8a1dc03c
commit 1fb7e4d374
18 changed files with 27 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>

View File

@@ -1,3 +1,5 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Application.TransactionsCQ.Commands.CreateNewTransactions; namespace CMSMicroservice.Application.TransactionsCQ.Commands.CreateNewTransactions;
public record CreateNewTransactionsCommand : IRequest<CreateNewTransactionsResponseDto> public record CreateNewTransactionsCommand : IRequest<CreateNewTransactionsResponseDto>
{ {

View File

@@ -1,3 +1,5 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Application.TransactionsCQ.Commands.UpdateTransactions; namespace CMSMicroservice.Application.TransactionsCQ.Commands.UpdateTransactions;
public record UpdateTransactionsCommand : IRequest<Unit> public record UpdateTransactionsCommand : IRequest<Unit>
{ {

View File

@@ -1,3 +1,5 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetAllTransactionsByFilter; namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetAllTransactionsByFilter;
public record GetAllTransactionsByFilterQuery : IRequest<GetAllTransactionsByFilterResponseDto> public record GetAllTransactionsByFilterQuery : IRequest<GetAllTransactionsByFilterResponseDto>
{ {

View File

@@ -1,3 +1,5 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetAllTransactionsByFilter; namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetAllTransactionsByFilter;
public class GetAllTransactionsByFilterResponseDto public class GetAllTransactionsByFilterResponseDto
{ {

View File

@@ -1,3 +1,5 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetTransactions; namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetTransactions;
public class GetTransactionsResponseDto public class GetTransactionsResponseDto
{ {

View File

@@ -21,7 +21,7 @@ public class GetAllUserOrderByFilterQueryHandler : IRequestHandler<GetAllUserOrd
.Where(x => request.Filter.Price == null || x.Price == request.Filter.Price) .Where(x => request.Filter.Price == null || x.Price == request.Filter.Price)
.Where(x => request.Filter.PackageId == null || x.PackageId == request.Filter.PackageId) .Where(x => request.Filter.PackageId == null || x.PackageId == request.Filter.PackageId)
.Where(x => request.Filter.TransactionId == null || x.TransactionId == request.Filter.TransactionId) .Where(x => request.Filter.TransactionId == null || x.TransactionId == request.Filter.TransactionId)
.Where(x => request.Filter.PaymentStatus == null || x.PaymentStatus == request.Filter.PaymentStatus) .Where(x => request.Filter.PaymentStatus == null || x.PaymentStatus.GetHashCode() == request.Filter.PaymentStatus)
.Where(x => request.Filter.PaymentDate == null || x.PaymentDate == request.Filter.PaymentDate) .Where(x => request.Filter.PaymentDate == null || x.PaymentDate == request.Filter.PaymentDate)
.Where(x => request.Filter.UserId == null || x.UserId == request.Filter.UserId) .Where(x => request.Filter.UserId == null || x.UserId == request.Filter.UserId)
.Where(x => request.Filter.UserAddressId == null || x.UserAddressId == request.Filter.UserAddressId) .Where(x => request.Filter.UserAddressId == null || x.UserAddressId == request.Filter.UserAddressId)

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>

View File

@@ -1,3 +1,5 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Domain.Entities; namespace CMSMicroservice.Domain.Entities;
//آدرس کاربر //آدرس کاربر
public class Transactions : BaseAuditableEntity public class Transactions : BaseAuditableEntity

View File

@@ -1,3 +1,5 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Domain.Entities; namespace CMSMicroservice.Domain.Entities;
//سفارش کاربر //سفارش کاربر
public class UserOrder : BaseAuditableEntity public class UserOrder : BaseAuditableEntity

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>

View File

@@ -13,7 +13,7 @@ public class FactorDetailsConfiguration : IEntityTypeConfiguration<FactorDetails
builder.Property(entity => entity.Id).UseIdentityColumn(); builder.Property(entity => entity.Id).UseIdentityColumn();
builder builder
.HasOne(entity => entity.Product) .HasOne(entity => entity.Product)
.WithMany(entity => entity.ProductFactorDetailss) .WithMany(entity => entity.FactorDetailss)
.HasForeignKey(entity => entity.ProductId) .HasForeignKey(entity => entity.ProductId)
.IsRequired(true); .IsRequired(true);
builder.Property(entity => entity.Count).IsRequired(true); builder.Property(entity => entity.Count).IsRequired(true);
@@ -21,7 +21,7 @@ public class FactorDetailsConfiguration : IEntityTypeConfiguration<FactorDetails
builder.Property(entity => entity.UnitDiscount).IsRequired(true); builder.Property(entity => entity.UnitDiscount).IsRequired(true);
builder builder
.HasOne(entity => entity.Order) .HasOne(entity => entity.Order)
.WithMany(entity => entity.OrderFactorDetailss) .WithMany(entity => entity.FactorDetailss)
.HasForeignKey(entity => entity.OrderId) .HasForeignKey(entity => entity.OrderId)
.IsRequired(true); .IsRequired(true);
builder.Property(entity => entity.UnitDiscountPrice).IsRequired(true); builder.Property(entity => entity.UnitDiscountPrice).IsRequired(true);

View File

@@ -13,12 +13,12 @@ public class ProductGallerysConfiguration : IEntityTypeConfiguration<ProductGall
builder.Property(entity => entity.Id).UseIdentityColumn(); builder.Property(entity => entity.Id).UseIdentityColumn();
builder builder
.HasOne(entity => entity.ProductImage) .HasOne(entity => entity.ProductImage)
.WithMany(entity => entity.ProductImageProductGalleryss) .WithMany(entity => entity.ProductGalleryss)
.HasForeignKey(entity => entity.ProductImageId) .HasForeignKey(entity => entity.ProductImageId)
.IsRequired(true); .IsRequired(true);
builder builder
.HasOne(entity => entity.Product) .HasOne(entity => entity.Product)
.WithMany(entity => entity.ProductProductGalleryss) .WithMany(entity => entity.ProductGalleryss)
.HasForeignKey(entity => entity.ProductId) .HasForeignKey(entity => entity.ProductId)
.IsRequired(true); .IsRequired(true);

View File

@@ -32,7 +32,7 @@ public class TransactionsConfiguration : IEntityTypeConfiguration<Transactions>
builder.Property(entity => entity.RefId).IsRequired(false); builder.Property(entity => entity.RefId).IsRequired(false);
builder builder
.HasOne(entity => entity.Order) .HasOne(entity => entity.Order)
.WithMany(entity => entity.OrderTransactionss) .WithMany(entity => entity.Transactionss)
.HasForeignKey(entity => entity.OrderId) .HasForeignKey(entity => entity.OrderId)
.IsRequired(false); .IsRequired(false);
builder.Property(entity => entity.Type).IsRequired(true); builder.Property(entity => entity.Type).IsRequired(true);

View File

@@ -13,7 +13,7 @@ public class UserCartsConfiguration : IEntityTypeConfiguration<UserCarts>
builder.Property(entity => entity.Id).UseIdentityColumn(); builder.Property(entity => entity.Id).UseIdentityColumn();
builder builder
.HasOne(entity => entity.Product) .HasOne(entity => entity.Product)
.WithMany(entity => entity.ProductUserCartss) .WithMany(entity => entity.UserCartss)
.HasForeignKey(entity => entity.ProductId) .HasForeignKey(entity => entity.ProductId)
.IsRequired(true); .IsRequired(true);
builder builder

View File

@@ -13,7 +13,7 @@ public class UserWalletChangeLogConfiguration : IEntityTypeConfiguration<UserWal
builder.Property(entity => entity.Id).UseIdentityColumn(); builder.Property(entity => entity.Id).UseIdentityColumn();
builder builder
.HasOne(entity => entity.Wallet) .HasOne(entity => entity.Wallet)
.WithMany(entity => entity.WalletUserWalletChangeLogs) .WithMany(entity => entity.UserWalletChangeLogs)
.HasForeignKey(entity => entity.WalletId) .HasForeignKey(entity => entity.WalletId)
.IsRequired(true); .IsRequired(true);
builder.Property(entity => entity.CurrentBalance).IsRequired(true); builder.Property(entity => entity.CurrentBalance).IsRequired(true);

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<Version>0.0.117</Version> <Version>0.0.117</Version>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
<DockerfileContext>..\..\..</DockerfileContext> <DockerfileContext>..\..\..</DockerfileContext>