feat: Add core services for user, category, item, and restaurant management, including caching and ownership verification.

This commit is contained in:
2025-12-11 11:16:09 +03:00
parent 66cab810c1
commit 6ad4871bdc
6 changed files with 122 additions and 24 deletions
+6 -1
View File
@@ -1,7 +1,12 @@
export const keys = {
restaurantBySlug: (slug: string) => `restaurant:slug:${slug}`,
restaurantCategories: (restaurantId: string) => `restaurant:${restaurantId}:categories`,
restaurantById: (id: string) => `restaurant:id:${id}`,
restaurantCategories: (restaurantId: string) =>
`restaurant:${restaurantId}:categories`,
restaurantItems: (restaurantId: string) => `restaurant:${restaurantId}:items`,
userRestaurants: (ownerId: string) => `user:${ownerId}:restaurants`,
category: (categoryId: string) => `category:${categoryId}`,
categoryItems: (categoryId: string) => `category:${categoryId}:items`,
item: (itemId: string) => `item:${itemId}`,
user: (userId: string) => `user:${userId}`,
};