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

@@ -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);