Response.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. using Domain.Entities.Store.ValueObject;
  2. namespace Application.Features.Admin.Store.Order.Get;
  3. public sealed record Response(
  4. int ID,
  5. string OrderNumber,
  6. int MemberID,
  7. string MemberEmail,
  8. int? ChannelID,
  9. string? ChannelName,
  10. int TotalAmount,
  11. int PlatformFeeAmount,
  12. int GameRevenueAmount,
  13. int ChannelRewardAmount,
  14. OrderStatus Status,
  15. string? CancelReason,
  16. string? RefundReason,
  17. DateTime CreatedAt,
  18. DateTime? PaidAt,
  19. List<Response.ItemRow> Items,
  20. List<Response.RefundRow> Refunds,
  21. Response.ShipmentInfo? Shipment
  22. )
  23. {
  24. public sealed record ItemRow(
  25. int ID,
  26. int ProductID,
  27. string ProductName,
  28. string TypeText,
  29. int Quantity,
  30. int UnitPrice,
  31. int LineTotal,
  32. int? IssuedCouponCodeID,
  33. string? IssuedCouponCode,
  34. IReadOnlyList<CouponDetail> CouponCodes
  35. );
  36. /// <summary>
  37. /// OrderItem 에 발급된 개별 쿠폰 코드 (수량만큼 N개).
  38. /// MemberInventory → CouponCode join 으로 채워짐.
  39. /// RefundRequestID 가 채워져 있으면 이미 환불 요청에 포함된 코드 (체크박스 비활성화).
  40. /// </summary>
  41. public sealed record CouponDetail(
  42. int CouponCodeID,
  43. string Code,
  44. DateTime? UsedAt,
  45. bool IsUsed,
  46. int? RefundRequestID
  47. );
  48. public sealed record RefundRow(
  49. int ID,
  50. RefundType Type,
  51. RefundStatus Status,
  52. int Amount,
  53. string Reason,
  54. string? AdminMemo,
  55. DateTime RequestedAt,
  56. DateTime? ResolvedAt,
  57. IReadOnlyList<RefundCoupon> Coupons
  58. );
  59. /// <summary>환불 이력 표에 표시할 포함 쿠폰 한 줄.</summary>
  60. public sealed record RefundCoupon(
  61. string Code,
  62. CouponPostRefundAction Action
  63. );
  64. public sealed record ShipmentInfo(
  65. int ID,
  66. ShipmentStatus Status,
  67. string? Carrier,
  68. string? TrackingNumber,
  69. DateTime? ShippedAt,
  70. DateTime? DeliveredAt
  71. );
  72. }