Add shopId and status query params to GET /api/v1/kitchen/tickets. Joins through Session to resolve shopId since KitchenTicket only has SessionId. Backward-compatible: without shopId falls back to existing pending-by-station behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
50 lines
1.8 KiB
C#
50 lines
1.8 KiB
C#
// EN: Repository interface for KitchenTicket aggregate.
|
|
// VI: Interface repository cho aggregate KitchenTicket.
|
|
|
|
using FnbEngine.Domain.SeedWork;
|
|
|
|
namespace FnbEngine.Domain.AggregatesModel.KitchenAggregate;
|
|
|
|
/// <summary>
|
|
/// EN: Repository interface for KitchenTicket aggregate root.
|
|
/// VI: Interface repository cho aggregate root KitchenTicket.
|
|
/// </summary>
|
|
public interface IKitchenTicketRepository : IRepository<KitchenTicket>
|
|
{
|
|
/// <summary>
|
|
/// EN: Add a new kitchen ticket.
|
|
/// VI: Thêm phiếu bếp mới.
|
|
/// </summary>
|
|
Task<KitchenTicket> AddAsync(KitchenTicket ticket, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// EN: Update an existing kitchen ticket.
|
|
/// VI: Cập nhật phiếu bếp hiện tại.
|
|
/// </summary>
|
|
void Update(KitchenTicket ticket);
|
|
|
|
/// <summary>
|
|
/// EN: Get kitchen ticket by ID.
|
|
/// VI: Lấy phiếu bếp theo ID.
|
|
/// </summary>
|
|
Task<KitchenTicket?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// EN: Get pending tickets by station.
|
|
/// VI: Lấy danh sách phiếu chờ theo trạm.
|
|
/// </summary>
|
|
Task<IEnumerable<KitchenTicket>> GetPendingByStationAsync(string? station, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// EN: Get tickets by session ID.
|
|
/// VI: Lấy danh sách phiếu theo session ID.
|
|
/// </summary>
|
|
Task<IEnumerable<KitchenTicket>> GetBySessionAsync(Guid sessionId, CancellationToken cancellationToken = default);
|
|
|
|
/// <summary>
|
|
/// EN: Get tickets by shop ID with optional status filter.
|
|
/// VI: Lấy danh sách phiếu theo shop ID với bộ lọc trạng thái tùy chọn.
|
|
/// </summary>
|
|
Task<IEnumerable<KitchenTicket>> GetByShopAsync(Guid shopId, string? status = null, CancellationToken cancellationToken = default);
|
|
}
|