forked from gongxuegit/tiku-backend.net
feat: add phase five operations foundation
This commit is contained in:
@@ -249,6 +249,91 @@ public sealed class UpsertPointExchangeItemDto
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class CreateRefundRequestDto
|
||||
{
|
||||
[Required]
|
||||
public Guid OrderId { get; set; }
|
||||
|
||||
public Guid? PaymentId { get; set; }
|
||||
|
||||
[Range(1, int.MaxValue)]
|
||||
public int AmountCents { get; set; }
|
||||
|
||||
[StringLength(1000)]
|
||||
public string? Reason { get; set; }
|
||||
|
||||
public RefundEntitlementAction EntitlementAction { get; set; } = RefundEntitlementAction.RevokeOnSuccess;
|
||||
public JsonElement Metadata { get; set; } = JsonDefaults.Object();
|
||||
|
||||
public CreateRefundRequestCommand ToCommand()
|
||||
{
|
||||
return new CreateRefundRequestCommand(OrderId, PaymentId, AmountCents, Reason, EntitlementAction, Metadata);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class UpdateRefundStatusDto
|
||||
{
|
||||
[Required]
|
||||
public Guid RefundRequestId { get; set; }
|
||||
|
||||
public CommerceRefundStatus Status { get; set; }
|
||||
|
||||
[StringLength(1000)]
|
||||
public string? Reason { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string? ProviderRefundNo { get; set; }
|
||||
|
||||
public UpdateRefundStatusCommand ToCommand()
|
||||
{
|
||||
return new UpdateRefundStatusCommand(RefundRequestId, Status, Reason, ProviderRefundNo);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class CreateReconciliationBatchDto
|
||||
{
|
||||
[Required]
|
||||
[StringLength(50)]
|
||||
public string Provider { get; set; } = string.Empty;
|
||||
|
||||
public DateOnly BillDate { get; set; }
|
||||
public ReconciliationBillType BillType { get; set; } = ReconciliationBillType.Combined;
|
||||
public ReconciliationSource Source { get; set; } = ReconciliationSource.ManualUpload;
|
||||
|
||||
[StringLength(200)]
|
||||
public string? SourceName { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(200)]
|
||||
public string SourceHash { get; set; } = string.Empty;
|
||||
|
||||
public JsonElement Metadata { get; set; } = JsonDefaults.Object();
|
||||
|
||||
public CreateReconciliationBatchCommand ToCommand()
|
||||
{
|
||||
return new CreateReconciliationBatchCommand(Provider, BillDate, BillType, Source, SourceName, SourceHash, Metadata);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class UpdateReconciliationIssueDto
|
||||
{
|
||||
[Required]
|
||||
public Guid IssueId { get; set; }
|
||||
|
||||
public ReconciliationIssueStatus Status { get; set; } = ReconciliationIssueStatus.Investigating;
|
||||
public ReconciliationResolutionType ResolutionType { get; set; } = ReconciliationResolutionType.None;
|
||||
|
||||
[StringLength(1000)]
|
||||
public string? Note { get; set; }
|
||||
|
||||
public Guid? AssignedTo { get; set; }
|
||||
|
||||
public UpdateReconciliationIssueCommand ToCommand()
|
||||
{
|
||||
return new UpdateReconciliationIssueCommand(IssueId, Status, ResolutionType, Note, AssignedTo);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class UpdatePointExchangeOrderStatusDto
|
||||
{
|
||||
[Required]
|
||||
|
||||
Reference in New Issue
Block a user