using System.ComponentModel.DataAnnotations; using Oms.Domain.MarketingAggregate.Enums; using Oms.Domain.Shared.Enums; namespace Oms.Application.Dtos.Marketing; public class ReferralCommissionRuleOutput { public int Id { get; set; } public string RuleName { get; set; } = string.Empty; public string CommissionMode { get; set; } = string.Empty; public decimal BaseAmount { get; set; } public decimal CommissionAmount { get; set; } public int FreezeDays { get; set; } public string SettleTriggerOrderStatus { get; set; } = string.Empty; public decimal? MonthlyCap { get; set; } public string MinInviteLevelCode { get; set; } = "V1"; public decimal MinPaidBaseFreight { get; set; } public decimal FirstOrderRate { get; set; } public decimal FirstOrderCap { get; set; } public decimal FollowOrderRate { get; set; } public decimal FollowOrderCap { get; set; } public int FollowWindowDays { get; set; } public int MaxRewardOrders { get; set; } public int SettleBusinessDays { get; set; } public EnableStatus Status { get; set; } public string StatusName { get; set; } = string.Empty; public DateTime CreateTime { get; set; } public DateTime? UpdateTime { get; set; } } public class ReferralCommissionRuleSaveInput { public int? Id { get; set; } [Required] public string RuleName { get; set; } = string.Empty; public string CommissionMode { get; set; } = "per_amount"; public decimal BaseAmount { get; set; } = 1000M; public decimal CommissionAmount { get; set; } = 2M; public int FreezeDays { get; set; } = 7; public string SettleTriggerOrderStatus { get; set; } = "deliverySuccess"; public decimal? MonthlyCap { get; set; } public string MinInviteLevelCode { get; set; } = "V1"; public decimal MinPaidBaseFreight { get; set; } = 50M; public decimal FirstOrderRate { get; set; } = 0.05M; public decimal FirstOrderCap { get; set; } = 50M; public decimal FollowOrderRate { get; set; } = 0.03M; public decimal FollowOrderCap { get; set; } = 30M; public int FollowWindowDays { get; set; } = 90; public int MaxRewardOrders { get; set; } = 6; public int SettleBusinessDays { get; set; } = 3; public EnableStatus Status { get; set; } = EnableStatus.Enabled; } public class CommissionDetailListInput { public int? ReferrerCustomerId { get; set; } public int? RefereeCustomerId { get; set; } public CommissionStatus? Status { get; set; } public string? OrderNo { get; set; } public DateTime? StartTime { get; set; } public DateTime? EndTime { get; set; } public int Page { get; set; } public int PageSize { get; set; } } public class CommissionDetailOutput { public int Id { get; set; } public int ReferrerCustomerId { get; set; } public string? ReferrerCustomerCode { get; set; } public int RefereeCustomerId { get; set; } public string? RefereeCustomerCode { get; set; } public int OrderId { get; set; } public string OrderNo { get; set; } = string.Empty; public decimal BasePayableAmount { get; set; } public decimal CommissionAmount { get; set; } public int RewardOrderIndex { get; set; } public DateTime? SettleDueTime { get; set; } public CommissionStatus Status { get; set; } public string StatusName { get; set; } = string.Empty; public DateTime? EligibleTime { get; set; } public DateTime? SettleTime { get; set; } public string? CancelReason { get; set; } public DateTime CreateTime { get; set; } } public class CommissionAdjustInput { public int? CustomerId { get; set; } public string? CustomerCode { get; set; } public decimal Amount { get; set; } public int? DetailId { get; set; } [Required] [StringLength(512, MinimumLength = 10)] public string Remark { get; set; } = string.Empty; } public class CommissionWithdrawListInput { public int? CustomerId { get; set; } /// 客户编号(解析为 CustomerId 再筛选)。 public string? CustomerCode { get; set; } public CommissionWithdrawType? WithdrawType { get; set; } public WithdrawStatus? Status { get; set; } public DateTime? StartTime { get; set; } public DateTime? EndTime { get; set; } public int Page { get; set; } public int PageSize { get; set; } } public class CommissionWithdrawOutput { public int Id { get; set; } public int CustomerId { get; set; } public string? CustomerCode { get; set; } public string SerialNumber { get; set; } = string.Empty; public decimal Amount { get; set; } /// 客户当前佣金余额(审核参考)。 public decimal CommissionBalance { get; set; } public CommissionWithdrawType WithdrawType { get; set; } public string WithdrawTypeName { get; set; } = string.Empty; public WithdrawStatus Status { get; set; } public string StatusName { get; set; } = string.Empty; public string? Remark { get; set; } public string? AuditRemark { get; set; } public string? AuditBy { get; set; } public DateTime? AuditTime { get; set; } public DateTime CreateTime { get; set; } } public class CommissionWithdrawApproveInput { [Required] public int Id { get; set; } public string? AuditRemark { get; set; } } public class CommissionWithdrawRejectInput { [Required] public int Id { get; set; } [Required] [StringLength(512, MinimumLength = 5)] public string AuditRemark { get; set; } = string.Empty; } public class CommissionOverviewOutput { public decimal CommissionBalance { get; set; } public decimal PendingCommission { get; set; } public decimal SettledThisMonth { get; set; } public int RefereeCount { get; set; } public decimal FrozenByPendingWithdraw { get; set; } public decimal AvailableCommission { get; set; } } public class CommissionTransferInput { [Range(typeof(decimal), "0.01", "999999999999")] public decimal Amount { get; set; } public string? Remark { get; set; } } public class CommissionWithdrawApplyInput { [Range(typeof(decimal), "0.01", "999999999999")] public decimal Amount { get; set; } public string? Remark { get; set; } }