f0f48118e7
- Implemented Create, Delete, Get, and Update validators for Product Galleries. - Added Create, Delete, Get, and Update validators for Product Tags. - Created service classes for handling Discount Categories, Discount Orders, Discount Products, Discount Shopping Cart, Product Categories, Product Galleries, and Product Tags. - Each service class integrates with CQRS for command and query handling. - Established mapping profiles for Product Galleries.
101 lines
4.3 KiB
C#
101 lines
4.3 KiB
C#
namespace CMSMicroservice.Domain.Entities;
|
|
//کاربر
|
|
public class User : BaseAuditableEntity
|
|
{
|
|
//نام
|
|
public string? FirstName { get; set; }
|
|
//نام خانوادگی
|
|
public string? LastName { get; set; }
|
|
//شماره موبایل
|
|
public string Mobile { get; set; }
|
|
//ایمیل
|
|
public string? Email { get; set; }
|
|
//کد ملی
|
|
public string? NationalCode { get; set; }
|
|
//آدرس آواتار
|
|
public string? AvatarPath { get; set; }
|
|
//کد ارجاع
|
|
public string ReferralCode { get; set; }
|
|
//موبایل فعال شده؟
|
|
public bool IsMobileVerified { get; set; }
|
|
//تاریخ فعال سازی موبایل
|
|
public DateTime? MobileVerifiedAt { get; set; }
|
|
//قوانین پذیرفته شده؟
|
|
public bool IsRulesAccepted { get; set; }
|
|
//تاریخ پذیرش قوانین
|
|
public DateTime? RulesAcceptedAt { get; set; }
|
|
//اعلان ایمیل
|
|
public bool EmailNotifications { get; set; }
|
|
//اعلان پیامک
|
|
public bool SmsNotifications { get; set; }
|
|
//اعلان پوش
|
|
public bool PushNotifications { get; set; }
|
|
//تاریخ تولد
|
|
public DateTime? BirthDate { get; set; }
|
|
//پسوورد هش کاربر
|
|
public string? HashPassword { get; set; }
|
|
|
|
// ============= Network Club System Fields =============
|
|
|
|
/// <summary>
|
|
/// شناسه والد در شبکه باینری
|
|
/// </summary>
|
|
public long? NetworkParentId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Network Parent Navigation Property
|
|
/// </summary>
|
|
public virtual User? NetworkParent { get; set; }
|
|
|
|
/// <summary>
|
|
/// موقعیت در شبکه (شاخه چپ یا راست)
|
|
/// </summary>
|
|
public NetworkLeg? LegPosition { get; set; }
|
|
|
|
/// <summary>
|
|
/// آیا اعتبار دایا را دریافت کرده است؟
|
|
/// </summary>
|
|
public bool HasReceivedDayaCredit { get; set; }
|
|
|
|
/// <summary>
|
|
/// تاریخ دریافت اعتبار دایا
|
|
/// </summary>
|
|
public DateTime? DayaCreditReceivedAt { get; set; }
|
|
|
|
/// <summary>
|
|
/// نحوه خرید پکیج طلایی (برای جلوگیری از خرید مجدد)
|
|
/// </summary>
|
|
public PackagePurchaseMethod PackagePurchaseMethod { get; set; } = PackagePurchaseMethod.None;
|
|
|
|
// ============= Navigation Properties =============
|
|
|
|
//UserAddress Collection Navigation Reference
|
|
public virtual ICollection<UserAddress> UserAddresses { get; set; }
|
|
//UserRole Collection Navigation Reference
|
|
public virtual ICollection<UserRole> UserRoles { get; set; }
|
|
//UserCarts Collection Navigation Reference
|
|
public virtual ICollection<UserCart> UserCarts { get; set; }
|
|
//UserContract Collection Navigation Reference
|
|
public virtual ICollection<UserContract> UserContracts { get; set; }
|
|
//UserOrder Collection Navigation Reference
|
|
public virtual ICollection<UserOrder> UserOrders { get; set; }
|
|
//UserWallet Collection Navigation Reference
|
|
public virtual ICollection<UserWallet> UserWallets { get; set; }
|
|
//NetworkChildren Collection Navigation Reference (فرزندان در شبکه باینری)
|
|
public virtual ICollection<User>? NetworkChildren { get; set; }
|
|
//ClubMembership Navigation Reference
|
|
public virtual ClubMembership? ClubMembership { get; set; }
|
|
//UserClubFeature Collection Navigation Reference
|
|
public virtual ICollection<UserClubFeature>? UserClubFeatures { get; set; }
|
|
//NetworkWeeklyBalance Collection Navigation Reference
|
|
public virtual ICollection<NetworkWeeklyBalance>? NetworkWeeklyBalances { get; set; }
|
|
//UserCommissionPayout Collection Navigation Reference
|
|
public virtual ICollection<UserCommissionPayout>? CommissionPayouts { get; set; }
|
|
//DayaLoanContract Collection Navigation Reference
|
|
public virtual ICollection<DayaLoanContract>? DayaLoanContracts { get; set; }
|
|
//DiscountShoppingCart Collection Navigation Reference (سبد خرید فروشگاه تخفیفی)
|
|
public virtual ICollection<DiscountShop.DiscountShoppingCart>? DiscountShoppingCarts { get; set; }
|
|
//DiscountOrder Collection Navigation Reference (سفارشات فروشگاه تخفیفی)
|
|
public virtual ICollection<DiscountShop.DiscountOrder>? DiscountOrders { get; set; }
|
|
}
|