backend phase 11

This commit is contained in:
hamid
2026-07-09 02:13:30 +03:30
parent 23605591eb
commit 465f75c29e
78 changed files with 9555 additions and 27 deletions
@@ -0,0 +1,26 @@
using System.ComponentModel.DataAnnotations;
using Asp.Versioning;
using Baya.Application.Features.Refunds.Queries.GetRefundStatus;
using Baya.Application.Models.Refunds;
using Baya.WebFramework.Attributes;
using Baya.WebFramework.BaseController;
using Mediator;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Baya.Web.Api.Controllers.V1;
/// <summary>The customer-facing refund status — the only customer-visible refund surface (there is no
/// self-service refund initiation). Tenancy-scoped: a customer sees only their own refund.</summary>
[ApiVersion("1")]
[ApiController]
[Route("api/v{version:apiVersion}/refunds")]
[Authorize]
[Display(Description = "Customer refund status")]
public sealed class RefundsController(ISender sender) : BaseController
{
[HttpGet("{id}/status")]
[ProducesOkApiResponseType<RefundStatusDto>]
public async Task<IActionResult> Status(long id, CancellationToken cancellationToken)
=> OperationResult(await sender.Send(new GetRefundStatusQuery(id), cancellationToken));
}