dc7e7a70fc
Introduced FlatPaymentController under Distribution.Features.Payment, providing GET and POST endpoints at /api/payments. Supports listing, retrieving, and creating payments with filtering and error handling. Business logic is delegated to PaymentService.
18 lines
435 B
C#
18 lines
435 B
C#
using Distribution.Models;
|
|
|
|
namespace Distribution.Features.Payment;
|
|
|
|
public record CreatePaymentRequest(decimal Amount, PaymentMethod Method);
|
|
|
|
public record CreateFlatPaymentRequest(Guid SaleId, decimal Amount, PaymentMethod Method);
|
|
|
|
public record PaymentResponse(
|
|
Guid Id,
|
|
Guid SaleId,
|
|
Guid StoreId,
|
|
decimal Amount,
|
|
PaymentMethod Method,
|
|
DateTime CollectedAt,
|
|
Guid CollectedBy,
|
|
DateTime CreatedAt);
|