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">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,3 +1,5 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Application.TransactionsCQ.Queries.GetTransactions;
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.PackageId == null || x.PackageId == request.Filter.PackageId)
.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.UserId == null || x.UserId == request.Filter.UserId)
.Where(x => request.Filter.UserAddressId == null || x.UserAddressId == request.Filter.UserAddressId)

View File

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

View File

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

View File

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

View File

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

View File

@@ -13,7 +13,7 @@ public class FactorDetailsConfiguration : IEntityTypeConfiguration<FactorDetails
builder.Property(entity => entity.Id).UseIdentityColumn();
builder
.HasOne(entity => entity.Product)
.WithMany(entity => entity.ProductFactorDetailss)
.WithMany(entity => entity.FactorDetailss)
.HasForeignKey(entity => entity.ProductId)
.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
.HasOne(entity => entity.Order)
.WithMany(entity => entity.OrderFactorDetailss)
.WithMany(entity => entity.FactorDetailss)
.HasForeignKey(entity => entity.OrderId)
.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
.HasOne(entity => entity.ProductImage)
.WithMany(entity => entity.ProductImageProductGalleryss)
.WithMany(entity => entity.ProductGalleryss)
.HasForeignKey(entity => entity.ProductImageId)
.IsRequired(true);
builder
.HasOne(entity => entity.Product)
.WithMany(entity => entity.ProductProductGalleryss)
.WithMany(entity => entity.ProductGalleryss)
.HasForeignKey(entity => entity.ProductId)
.IsRequired(true);

View File

@@ -32,7 +32,7 @@ public class TransactionsConfiguration : IEntityTypeConfiguration<Transactions>
builder.Property(entity => entity.RefId).IsRequired(false);
builder
.HasOne(entity => entity.Order)
.WithMany(entity => entity.OrderTransactionss)
.WithMany(entity => entity.Transactionss)
.HasForeignKey(entity => entity.OrderId)
.IsRequired(false);
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
.HasOne(entity => entity.Product)
.WithMany(entity => entity.ProductUserCartss)
.WithMany(entity => entity.UserCartss)
.HasForeignKey(entity => entity.ProductId)
.IsRequired(true);
builder

View File

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

View File

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

View File

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