Generator Changes at 11/25/2025 12:39:59 AM +03:30

This commit is contained in:
masoodafar-web
2025-11-25 00:42:45 +03:30
parent a2d293ed01
commit 02fc3f9122
3 changed files with 9 additions and 7 deletions

View File

@@ -1,5 +1,3 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Domain.Entities;
//آدرس کاربر
public class Transactions : BaseAuditableEntity
@@ -11,4 +9,6 @@ public class Transactions : BaseAuditableEntity
public DateTime? PaymentDate { get; set; }
public string? RefId { get; set; }
public TransactionType Type { get; set; }
//UserOrder Collection Navigation Reference
public virtual ICollection<UserOrder> UserOrders { get; set; }
}

View File

@@ -1,5 +1,3 @@
using CMSMicroservice.Domain.Enums;
namespace CMSMicroservice.Domain.Entities;
//سفارش کاربر
public class UserOrder : BaseAuditableEntity
@@ -12,6 +10,8 @@ public class UserOrder : BaseAuditableEntity
public virtual Package? Package { get; set; }
//شناسه تراکنش
public long? TransactionId { get; set; }
//Transaction Navigation Property
public virtual Transactions? Transaction { get; set; }
//وضعیت پرداخت
public PaymentStatus PaymentStatus { get; set; }
//تاریخ پرداخت
@@ -27,6 +27,4 @@ public class UserOrder : BaseAuditableEntity
public PaymentMethod? PaymentMethod { get; set; }
//FactorDetails Collection Navigation Reference
public virtual ICollection<FactorDetails> FactorDetailss { get; set; }
//Transactions Collection Navigation Reference
public virtual ICollection<Transactions> Transactionss { get; set; }
}

View File

@@ -17,7 +17,11 @@ public class UserOrderConfiguration : IEntityTypeConfiguration<UserOrder>
.WithMany(entity => entity.UserOrders)
.HasForeignKey(entity => entity.PackageId)
.IsRequired(false);
builder.Property(entity => entity.TransactionId).IsRequired(false);
builder
.HasOne(entity => entity.Transaction)
.WithMany(entity => entity.TransactionUserOrders)
.HasForeignKey(entity => entity.TransactionId)
.IsRequired(false);
builder.Property(entity => entity.PaymentStatus).IsRequired(true);
builder.Property(entity => entity.PaymentDate).IsRequired(false);
builder