feat(api): .NET 10 multi-tenant REST API
Full backend implementation: - Multi-tenant cafe/restaurant management (menus, orders, tables, staff) - POS order flow with ZarinPal and Snappfood payment integration - OTP authentication via Kavenegar SMS - QR digital menu with public discover/finder endpoints - Customer loyalty, coupons, CRM - PostgreSQL via EF Core, Redis for caching/sessions - Background jobs, webhook handlers - Full migration history Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using Meezi.API.Hubs;
|
||||
using Meezi.API.Models.Orders;
|
||||
using Meezi.Core.Enums;
|
||||
|
||||
namespace Meezi.API.Services;
|
||||
|
||||
public class KdsNotifier : IKdsNotifier
|
||||
{
|
||||
private readonly IHubContext<KdsHub> _hubContext;
|
||||
|
||||
public KdsNotifier(IHubContext<KdsHub> hubContext)
|
||||
{
|
||||
_hubContext = hubContext;
|
||||
}
|
||||
|
||||
public Task NotifyOrderCreatedAsync(string cafeId, LiveOrderDto order, CancellationToken cancellationToken = default) =>
|
||||
_hubContext.Clients.Group(KdsHub.GroupName(cafeId)).SendAsync("OrderCreated", order, cancellationToken);
|
||||
|
||||
public Task NotifyOrderStatusChangedAsync(string cafeId, string orderId, OrderStatus status, CancellationToken cancellationToken = default) =>
|
||||
_hubContext.Clients.Group(KdsHub.GroupName(cafeId)).SendAsync("OrderStatusChanged", new { orderId, status }, cancellationToken);
|
||||
|
||||
public Task NotifyTableStatusChangedAsync(string cafeId, CancellationToken cancellationToken = default) =>
|
||||
_hubContext.Clients.Group(KdsHub.GroupName(cafeId)).SendAsync("TableStatusChanged", null, cancellationToken);
|
||||
}
|
||||
Reference in New Issue
Block a user