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:
soroush.asadi
2026-05-27 21:33:48 +03:30
parent 03376b3ea1
commit ef15fd6247
472 changed files with 120358 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
using Meezi.Core.Enums;
using Meezi.Core.Platform;
namespace Meezi.Admin.API.Models;
public record AdminDashboardStatsDto(
int TotalCafes,
int ActiveCafes,
int SuspendedCafes,
int OpenTickets,
int PlansConfigured);
public record UpdatePlanRequest(
string DisplayNameFa,
string? DisplayNameEn,
decimal MonthlyPriceToman,
bool IsBillableOnline,
bool IsActive,
int SortOrder,
PlanLimitsData Limits,
IReadOnlyList<string>? FeatureKeys);
public record UpdateSettingRequest(string Value, string? DescriptionFa);
public record UpdateFeatureRequest(
string DisplayNameFa,
string? DisplayNameEn,
string ModuleGroup,
bool IsEnabledGlobally);
public record AdminCafeListItemDto(
string Id,
string Name,
string Slug,
string City,
PlanTier PlanTier,
DateTime? PlanExpiresAt,
bool IsSuspended,
bool IsVerified,
int BranchCount,
int EmployeeCount,
DateTime CreatedAt);
public record AdminCafePatchRequest(
PlanTier? PlanTier,
DateTime? PlanExpiresAt,
bool? IsSuspended,
bool? IsVerified,
IReadOnlyList<string>? DiscoverBadges = null);
public record CafeFeatureOverrideRequest(string FeatureKey, bool IsEnabled);
+22
View File
@@ -0,0 +1,22 @@
using Meezi.Core.Constants;
namespace Meezi.Admin.API.Models;
public record SendOtpRequest(string Phone);
public record VerifyOtpRequest(string Phone, string Code);
public record RefreshTokenRequest(string RefreshToken);
public record AuthTokenResponse(
string AccessToken,
string RefreshToken,
DateTime ExpiresAt,
string UserId,
string CafeId,
string Role,
string PlanTier,
string Language,
string Actor = MeeziActorKinds.SystemAdmin);
public record SendOtpResponse(bool Sent, int ExpiresInSeconds);
@@ -0,0 +1,23 @@
namespace Meezi.Admin.API.Models;
public record AdminCafeDiscoverProfileDto(
string CafeId,
string CafeName,
IReadOnlyList<string> Themes,
string? Size,
string? Floors,
IReadOnlyList<string> Vibes,
IReadOnlyList<string> Occasions,
IReadOnlyList<string> SpaceFeatures,
string? NoiseLevel,
string? PriceTier);
public record AdminUpsertCafeDiscoverProfileRequest(
IReadOnlyList<string>? Themes,
string? Size,
string? Floors,
IReadOnlyList<string>? Vibes,
IReadOnlyList<string>? Occasions,
IReadOnlyList<string>? SpaceFeatures,
string? NoiseLevel,
string? PriceTier);
@@ -0,0 +1,109 @@
namespace Meezi.Admin.API.Models;
public record GatewayCredentialsDto(
string? Username,
string? Password,
string? BranchCode,
string? TerminalCode,
string? ClientId,
string? ClientSecret,
string? BaseUrl,
bool HasStoredPassword,
bool HasStoredClientSecret);
public record PaymentGatewayConfigDto(
string Id,
string DisplayNameFa,
bool IsEnabled,
bool IsActive,
string? MerchantId,
string? ApiKey,
bool Sandbox,
bool HasStoredSecret,
GatewayCredentialsDto? Credentials = null);
public record KavenegarConfigDto(
bool IsEnabled,
string? ApiKey,
string OtpTemplate,
bool HasStoredApiKey);
public record OpenAiIntegrationConfigDto(
bool IsEnabled,
string? ApiKey,
string Model,
bool CoffeeAdvisorEnabled,
bool HasStoredApiKey);
public record MeshyIntegrationConfigDto(
bool IsEnabled,
string? ApiKey,
bool Menu3dEnabled,
bool HasStoredApiKey);
public record AiIntegrationsConfigDto(
OpenAiIntegrationConfigDto OpenAi,
MeshyIntegrationConfigDto Meshy);
public record PlatformIntegrationsDto(
string ActivePaymentGateway,
IReadOnlyList<PaymentGatewayConfigDto> PaymentGateways,
KavenegarConfigDto Kavenegar,
AiIntegrationsConfigDto Ai);
public record UpdatePlatformIntegrationsRequest(
string ActivePaymentGateway,
IReadOnlyList<UpdatePaymentGatewayRequest> PaymentGateways,
UpdateKavenegarRequest Kavenegar,
UpdateAiIntegrationsRequest Ai);
public record UpdateOpenAiIntegrationRequest(
bool IsEnabled,
string? ApiKey,
string Model,
bool CoffeeAdvisorEnabled);
public record UpdateMeshyIntegrationRequest(
bool IsEnabled,
string? ApiKey,
bool Menu3dEnabled);
public record UpdateAiIntegrationsRequest(
UpdateOpenAiIntegrationRequest OpenAi,
UpdateMeshyIntegrationRequest Meshy);
public record UpdatePaymentGatewayCredentialsRequest(
string? Username,
string? Password,
string? BranchCode,
string? TerminalCode,
string? ClientId,
string? ClientSecret,
string? BaseUrl);
public record UpdatePaymentGatewayRequest(
string Id,
bool IsEnabled,
string? MerchantId,
string? ApiKey,
bool Sandbox,
UpdatePaymentGatewayCredentialsRequest? Credentials = null);
public record UpdateKavenegarRequest(
bool IsEnabled,
string? ApiKey,
string OtpTemplate);
public record AdminNotificationRowDto(
string Id,
string CafeId,
string CafeName,
string Type,
string Title,
string? Body,
bool IsRead,
DateTime CreatedAt);
public record BroadcastNotificationRequest(string Title, string Body);
public record BroadcastNotificationResult(int CafeCount, int NotificationCount);
@@ -0,0 +1,11 @@
namespace Meezi.Admin.API.Models;
public record CafeNotificationDto(
string Id,
string Type,
string Title,
string? Body,
string? ReferenceId,
string? TableNumber,
bool IsRead,
DateTime CreatedAt);