feat: add geography entities with countries, states and cities

This commit is contained in:
masoodafar-web
2025-12-18 00:43:55 +03:30
parent 26e1243cfe
commit ead0cf4235
40 changed files with 5386 additions and 7 deletions
@@ -1,6 +1,7 @@
using CMSMicroservice.Domain.Entities.Payment;
using CMSMicroservice.Domain.Entities.Order;
using CMSMicroservice.Domain.Entities.DiscountShop;
using CMSMicroservice.Domain.Entities.Geography;
namespace CMSMicroservice.Application.Common.Interfaces;
@@ -53,5 +54,10 @@ public interface IApplicationDbContext
DbSet<DiscountOrder> DiscountOrders { get; }
DbSet<DiscountOrderDetail> DiscountOrderDetails { get; }
// ============= Geography =============
DbSet<Country> Countries { get; }
DbSet<State> States { get; }
DbSet<City> Cities { get; }
Task<int> SaveChangesAsync(CancellationToken cancellationToken = default);
}
@@ -0,0 +1,26 @@
namespace CMSMicroservice.Application.Common.Interfaces;
/// <summary>
/// Interface for sending token-related notifications via SignalR
/// </summary>
public interface ITokenNotificationService
{
/// <summary>
/// Notify that a user's token has been revoked and they should refresh their token
/// </summary>
/// <param name="userId">The user ID whose token was revoked</param>
/// <param name="reason">The reason for revocation</param>
Task NotifyTokenRevokedAsync(long userId, string reason);
/// <summary>
/// Notify that a user should refresh their token due to profile changes
/// </summary>
/// <param name="userId">The user ID whose profile changed</param>
Task NotifyForceRefreshAsync(long userId);
/// <summary>
/// Broadcast a message to all connected clients
/// </summary>
/// <param name="message">The message to broadcast</param>
Task BroadcastMessageAsync(string message);
}