diff --git a/apps/admin-ui/.expo/types/router.d.ts b/apps/admin-ui/.expo/types/router.d.ts
index 767f20b..6390fc7 100644
--- a/apps/admin-ui/.expo/types/router.d.ts
+++ b/apps/admin-ui/.expo/types/router.d.ts
@@ -6,9 +6,9 @@ export * from 'expo-router';
declare module 'expo-router' {
export namespace ExpoRouter {
export interface __routes {
- hrefInputParams: { pathname: Router.RelativePathString, params?: Router.UnknownInputParams } | { pathname: Router.ExternalPathString, params?: Router.UnknownInputParams } | { pathname: `/`; params?: Router.UnknownInputParams; } | { pathname: `/login`; params?: Router.UnknownInputParams; } | { pathname: `/_sitemap`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/address-management` | `/address-management`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/complaints` | `/complaints`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons/create` | `/coupons/create`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons` | `/coupons`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons/reserved-coupons` | `/coupons/reserved-coupons`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/customize-app/all-items-order` | `/customize-app/all-items-order`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/customize-app` | `/customize-app`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/customize-app/popular-items` | `/customize-app/popular-items`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard` | `/dashboard`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners/create` | `/dashboard-banners/create`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners` | `/dashboard-banners`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/manage-orders` | `/manage-orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/manage-orders/delivery-sequences` | `/manage-orders/delivery-sequences`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/manage-orders/orders` | `/manage-orders/orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/prices-overview` | `/prices-overview`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-groupings/create` | `/product-groupings/create`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-groupings` | `/product-groupings`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-tags/add` | `/product-tags/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-tags` | `/product-tags`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-tags/edit` | `/product-tags/edit`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/products/add` | `/products/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/products/edit` | `/products/edit`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/products` | `/products`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/rebalance-orders` | `/rebalance-orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/send-notifications` | `/send-notifications`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots/add` | `/slots/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots` | `/slots`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots/slot-details` | `/slots/slot-details`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/stores/add` | `/stores/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/stores/edit` | `/stores/edit`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/stores` | `/stores`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/user-management` | `/user-management`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/users` | `/users`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/vendor-snippets` | `/vendor-snippets`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons/edit/[id]` | `/coupons/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/dashboard-banners/edit/[id]` | `/dashboard-banners/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/manage-orders/order-details/[id]` | `/manage-orders/order-details/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/product-groupings/edit/[id]` | `/product-groupings/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/products/detail/[id]` | `/products/detail/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/slots/edit/[id]` | `/slots/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/user-management/[id]` | `/user-management/[id]`, params: Router.UnknownInputParams & { id: string | number; } };
- hrefOutputParams: { pathname: Router.RelativePathString, params?: Router.UnknownOutputParams } | { pathname: Router.ExternalPathString, params?: Router.UnknownOutputParams } | { pathname: `/`; params?: Router.UnknownOutputParams; } | { pathname: `/login`; params?: Router.UnknownOutputParams; } | { pathname: `/_sitemap`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/address-management` | `/address-management`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/complaints` | `/complaints`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/coupons/create` | `/coupons/create`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/coupons` | `/coupons`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/coupons/reserved-coupons` | `/coupons/reserved-coupons`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/customize-app/all-items-order` | `/customize-app/all-items-order`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/customize-app` | `/customize-app`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/customize-app/popular-items` | `/customize-app/popular-items`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/dashboard` | `/dashboard`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners/create` | `/dashboard-banners/create`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners` | `/dashboard-banners`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/manage-orders` | `/manage-orders`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/manage-orders/delivery-sequences` | `/manage-orders/delivery-sequences`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/manage-orders/orders` | `/manage-orders/orders`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/prices-overview` | `/prices-overview`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/product-groupings/create` | `/product-groupings/create`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/product-groupings` | `/product-groupings`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/product-tags/add` | `/product-tags/add`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/product-tags` | `/product-tags`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/product-tags/edit` | `/product-tags/edit`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/products/add` | `/products/add`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/products/edit` | `/products/edit`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/products` | `/products`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/rebalance-orders` | `/rebalance-orders`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/send-notifications` | `/send-notifications`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/slots/add` | `/slots/add`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/slots` | `/slots`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/slots/slot-details` | `/slots/slot-details`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/stores/add` | `/stores/add`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/stores/edit` | `/stores/edit`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/stores` | `/stores`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/user-management` | `/user-management`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/users` | `/users`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/vendor-snippets` | `/vendor-snippets`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/coupons/edit/[id]` | `/coupons/edit/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/dashboard-banners/edit/[id]` | `/dashboard-banners/edit/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/manage-orders/order-details/[id]` | `/manage-orders/order-details/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/product-groupings/edit/[id]` | `/product-groupings/edit/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/products/detail/[id]` | `/products/detail/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/slots/edit/[id]` | `/slots/edit/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/user-management/[id]` | `/user-management/[id]`, params: Router.UnknownOutputParams & { id: string; } };
- href: Router.RelativePathString | Router.ExternalPathString | `/${`?${string}` | `#${string}` | ''}` | `/login${`?${string}` | `#${string}` | ''}` | `/_sitemap${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/address-management${`?${string}` | `#${string}` | ''}` | `/address-management${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/complaints${`?${string}` | `#${string}` | ''}` | `/complaints${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/coupons/create${`?${string}` | `#${string}` | ''}` | `/coupons/create${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/coupons${`?${string}` | `#${string}` | ''}` | `/coupons${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/coupons/reserved-coupons${`?${string}` | `#${string}` | ''}` | `/coupons/reserved-coupons${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/customize-app/all-items-order${`?${string}` | `#${string}` | ''}` | `/customize-app/all-items-order${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/customize-app${`?${string}` | `#${string}` | ''}` | `/customize-app${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/customize-app/popular-items${`?${string}` | `#${string}` | ''}` | `/customize-app/popular-items${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/dashboard${`?${string}` | `#${string}` | ''}` | `/dashboard${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/dashboard-banners/create${`?${string}` | `#${string}` | ''}` | `/dashboard-banners/create${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/dashboard-banners${`?${string}` | `#${string}` | ''}` | `/dashboard-banners${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/manage-orders${`?${string}` | `#${string}` | ''}` | `/manage-orders${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/manage-orders/delivery-sequences${`?${string}` | `#${string}` | ''}` | `/manage-orders/delivery-sequences${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/manage-orders/orders${`?${string}` | `#${string}` | ''}` | `/manage-orders/orders${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/prices-overview${`?${string}` | `#${string}` | ''}` | `/prices-overview${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-groupings/create${`?${string}` | `#${string}` | ''}` | `/product-groupings/create${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-groupings${`?${string}` | `#${string}` | ''}` | `/product-groupings${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-tags/add${`?${string}` | `#${string}` | ''}` | `/product-tags/add${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-tags${`?${string}` | `#${string}` | ''}` | `/product-tags${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-tags/edit${`?${string}` | `#${string}` | ''}` | `/product-tags/edit${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/products/add${`?${string}` | `#${string}` | ''}` | `/products/add${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/products/edit${`?${string}` | `#${string}` | ''}` | `/products/edit${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/products${`?${string}` | `#${string}` | ''}` | `/products${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/rebalance-orders${`?${string}` | `#${string}` | ''}` | `/rebalance-orders${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/send-notifications${`?${string}` | `#${string}` | ''}` | `/send-notifications${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/slots/add${`?${string}` | `#${string}` | ''}` | `/slots/add${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/slots${`?${string}` | `#${string}` | ''}` | `/slots${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/slots/slot-details${`?${string}` | `#${string}` | ''}` | `/slots/slot-details${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/stores/add${`?${string}` | `#${string}` | ''}` | `/stores/add${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/stores/edit${`?${string}` | `#${string}` | ''}` | `/stores/edit${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/stores${`?${string}` | `#${string}` | ''}` | `/stores${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/user-management${`?${string}` | `#${string}` | ''}` | `/user-management${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/users${`?${string}` | `#${string}` | ''}` | `/users${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/vendor-snippets${`?${string}` | `#${string}` | ''}` | `/vendor-snippets${`?${string}` | `#${string}` | ''}` | { pathname: Router.RelativePathString, params?: Router.UnknownInputParams } | { pathname: Router.ExternalPathString, params?: Router.UnknownInputParams } | { pathname: `/`; params?: Router.UnknownInputParams; } | { pathname: `/login`; params?: Router.UnknownInputParams; } | { pathname: `/_sitemap`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/address-management` | `/address-management`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/complaints` | `/complaints`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons/create` | `/coupons/create`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons` | `/coupons`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons/reserved-coupons` | `/coupons/reserved-coupons`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/customize-app/all-items-order` | `/customize-app/all-items-order`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/customize-app` | `/customize-app`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/customize-app/popular-items` | `/customize-app/popular-items`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard` | `/dashboard`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners/create` | `/dashboard-banners/create`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners` | `/dashboard-banners`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/manage-orders` | `/manage-orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/manage-orders/delivery-sequences` | `/manage-orders/delivery-sequences`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/manage-orders/orders` | `/manage-orders/orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/prices-overview` | `/prices-overview`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-groupings/create` | `/product-groupings/create`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-groupings` | `/product-groupings`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-tags/add` | `/product-tags/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-tags` | `/product-tags`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-tags/edit` | `/product-tags/edit`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/products/add` | `/products/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/products/edit` | `/products/edit`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/products` | `/products`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/rebalance-orders` | `/rebalance-orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/send-notifications` | `/send-notifications`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots/add` | `/slots/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots` | `/slots`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots/slot-details` | `/slots/slot-details`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/stores/add` | `/stores/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/stores/edit` | `/stores/edit`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/stores` | `/stores`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/user-management` | `/user-management`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/users` | `/users`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/vendor-snippets` | `/vendor-snippets`; params?: Router.UnknownInputParams; } | `${'/(drawer)'}/coupons/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/coupons/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/dashboard-banners/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/dashboard-banners/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/manage-orders/order-details/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/manage-orders/order-details/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-groupings/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/product-groupings/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/products/detail/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/products/detail/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/slots/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/slots/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/user-management/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/user-management/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | { pathname: `${'/(drawer)'}/coupons/edit/[id]` | `/coupons/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/dashboard-banners/edit/[id]` | `/dashboard-banners/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/manage-orders/order-details/[id]` | `/manage-orders/order-details/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/product-groupings/edit/[id]` | `/product-groupings/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/products/detail/[id]` | `/products/detail/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/slots/edit/[id]` | `/slots/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/user-management/[id]` | `/user-management/[id]`, params: Router.UnknownInputParams & { id: string | number; } };
+ hrefInputParams: { pathname: Router.RelativePathString, params?: Router.UnknownInputParams } | { pathname: Router.ExternalPathString, params?: Router.UnknownInputParams } | { pathname: `/`; params?: Router.UnknownInputParams; } | { pathname: `/login`; params?: Router.UnknownInputParams; } | { pathname: `/_sitemap`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/complaints` | `/complaints`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons/create` | `/coupons/create`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons` | `/coupons`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons/reserved-coupons` | `/coupons/reserved-coupons`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/customize-app/all-items-order` | `/customize-app/all-items-order`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/customize-app` | `/customize-app`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/customize-app/popular-items` | `/customize-app/popular-items`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard` | `/dashboard`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners/create` | `/dashboard-banners/create`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners` | `/dashboard-banners`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/manage-orders` | `/manage-orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/manage-orders/delivery-sequences` | `/manage-orders/delivery-sequences`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/manage-orders/orders` | `/manage-orders/orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/prices-overview` | `/prices-overview`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-groupings/create` | `/product-groupings/create`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-groupings` | `/product-groupings`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-tags/add` | `/product-tags/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-tags` | `/product-tags`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-tags/edit` | `/product-tags/edit`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/products/add` | `/products/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/products/edit` | `/products/edit`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/products` | `/products`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/rebalance-orders` | `/rebalance-orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/send-notifications` | `/send-notifications`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots/add` | `/slots/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots` | `/slots`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots/slot-details` | `/slots/slot-details`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/stores/add` | `/stores/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/stores/edit` | `/stores/edit`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/stores` | `/stores`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/user-management` | `/user-management`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/users` | `/users`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/vendor-snippets` | `/vendor-snippets`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons/edit/[id]` | `/coupons/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/dashboard-banners/edit/[id]` | `/dashboard-banners/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/manage-orders/order-details/[id]` | `/manage-orders/order-details/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/product-groupings/edit/[id]` | `/product-groupings/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/products/detail/[id]` | `/products/detail/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/slots/edit/[id]` | `/slots/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/user-management/[id]` | `/user-management/[id]`, params: Router.UnknownInputParams & { id: string | number; } };
+ hrefOutputParams: { pathname: Router.RelativePathString, params?: Router.UnknownOutputParams } | { pathname: Router.ExternalPathString, params?: Router.UnknownOutputParams } | { pathname: `/`; params?: Router.UnknownOutputParams; } | { pathname: `/login`; params?: Router.UnknownOutputParams; } | { pathname: `/_sitemap`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/complaints` | `/complaints`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/coupons/create` | `/coupons/create`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/coupons` | `/coupons`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/coupons/reserved-coupons` | `/coupons/reserved-coupons`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/customize-app/all-items-order` | `/customize-app/all-items-order`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/customize-app` | `/customize-app`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/customize-app/popular-items` | `/customize-app/popular-items`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/dashboard` | `/dashboard`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners/create` | `/dashboard-banners/create`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners` | `/dashboard-banners`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/manage-orders` | `/manage-orders`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/manage-orders/delivery-sequences` | `/manage-orders/delivery-sequences`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/manage-orders/orders` | `/manage-orders/orders`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/prices-overview` | `/prices-overview`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/product-groupings/create` | `/product-groupings/create`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/product-groupings` | `/product-groupings`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/product-tags/add` | `/product-tags/add`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/product-tags` | `/product-tags`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/product-tags/edit` | `/product-tags/edit`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/products/add` | `/products/add`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/products/edit` | `/products/edit`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/products` | `/products`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/rebalance-orders` | `/rebalance-orders`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/send-notifications` | `/send-notifications`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/slots/add` | `/slots/add`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/slots` | `/slots`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/slots/slot-details` | `/slots/slot-details`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/stores/add` | `/stores/add`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/stores/edit` | `/stores/edit`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/stores` | `/stores`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/user-management` | `/user-management`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/users` | `/users`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/vendor-snippets` | `/vendor-snippets`; params?: Router.UnknownOutputParams; } | { pathname: `${'/(drawer)'}/coupons/edit/[id]` | `/coupons/edit/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/dashboard-banners/edit/[id]` | `/dashboard-banners/edit/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/manage-orders/order-details/[id]` | `/manage-orders/order-details/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/product-groupings/edit/[id]` | `/product-groupings/edit/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/products/detail/[id]` | `/products/detail/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/slots/edit/[id]` | `/slots/edit/[id]`, params: Router.UnknownOutputParams & { id: string; } } | { pathname: `${'/(drawer)'}/user-management/[id]` | `/user-management/[id]`, params: Router.UnknownOutputParams & { id: string; } };
+ href: Router.RelativePathString | Router.ExternalPathString | `/${`?${string}` | `#${string}` | ''}` | `/login${`?${string}` | `#${string}` | ''}` | `/_sitemap${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/complaints${`?${string}` | `#${string}` | ''}` | `/complaints${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/coupons/create${`?${string}` | `#${string}` | ''}` | `/coupons/create${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/coupons${`?${string}` | `#${string}` | ''}` | `/coupons${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/coupons/reserved-coupons${`?${string}` | `#${string}` | ''}` | `/coupons/reserved-coupons${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/customize-app/all-items-order${`?${string}` | `#${string}` | ''}` | `/customize-app/all-items-order${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/customize-app${`?${string}` | `#${string}` | ''}` | `/customize-app${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/customize-app/popular-items${`?${string}` | `#${string}` | ''}` | `/customize-app/popular-items${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/dashboard${`?${string}` | `#${string}` | ''}` | `/dashboard${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/dashboard-banners/create${`?${string}` | `#${string}` | ''}` | `/dashboard-banners/create${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/dashboard-banners${`?${string}` | `#${string}` | ''}` | `/dashboard-banners${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/manage-orders${`?${string}` | `#${string}` | ''}` | `/manage-orders${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/manage-orders/delivery-sequences${`?${string}` | `#${string}` | ''}` | `/manage-orders/delivery-sequences${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/manage-orders/orders${`?${string}` | `#${string}` | ''}` | `/manage-orders/orders${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/prices-overview${`?${string}` | `#${string}` | ''}` | `/prices-overview${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-groupings/create${`?${string}` | `#${string}` | ''}` | `/product-groupings/create${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-groupings${`?${string}` | `#${string}` | ''}` | `/product-groupings${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-tags/add${`?${string}` | `#${string}` | ''}` | `/product-tags/add${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-tags${`?${string}` | `#${string}` | ''}` | `/product-tags${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-tags/edit${`?${string}` | `#${string}` | ''}` | `/product-tags/edit${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/products/add${`?${string}` | `#${string}` | ''}` | `/products/add${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/products/edit${`?${string}` | `#${string}` | ''}` | `/products/edit${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/products${`?${string}` | `#${string}` | ''}` | `/products${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/rebalance-orders${`?${string}` | `#${string}` | ''}` | `/rebalance-orders${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/send-notifications${`?${string}` | `#${string}` | ''}` | `/send-notifications${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/slots/add${`?${string}` | `#${string}` | ''}` | `/slots/add${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/slots${`?${string}` | `#${string}` | ''}` | `/slots${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/slots/slot-details${`?${string}` | `#${string}` | ''}` | `/slots/slot-details${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/stores/add${`?${string}` | `#${string}` | ''}` | `/stores/add${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/stores/edit${`?${string}` | `#${string}` | ''}` | `/stores/edit${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/stores${`?${string}` | `#${string}` | ''}` | `/stores${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/user-management${`?${string}` | `#${string}` | ''}` | `/user-management${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/users${`?${string}` | `#${string}` | ''}` | `/users${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/vendor-snippets${`?${string}` | `#${string}` | ''}` | `/vendor-snippets${`?${string}` | `#${string}` | ''}` | { pathname: Router.RelativePathString, params?: Router.UnknownInputParams } | { pathname: Router.ExternalPathString, params?: Router.UnknownInputParams } | { pathname: `/`; params?: Router.UnknownInputParams; } | { pathname: `/login`; params?: Router.UnknownInputParams; } | { pathname: `/_sitemap`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/complaints` | `/complaints`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons/create` | `/coupons/create`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons` | `/coupons`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/coupons/reserved-coupons` | `/coupons/reserved-coupons`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/customize-app/all-items-order` | `/customize-app/all-items-order`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/customize-app` | `/customize-app`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/customize-app/popular-items` | `/customize-app/popular-items`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard` | `/dashboard`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners/create` | `/dashboard-banners/create`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/dashboard-banners` | `/dashboard-banners`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/manage-orders` | `/manage-orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/manage-orders/delivery-sequences` | `/manage-orders/delivery-sequences`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/manage-orders/orders` | `/manage-orders/orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/prices-overview` | `/prices-overview`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-groupings/create` | `/product-groupings/create`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-groupings` | `/product-groupings`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-tags/add` | `/product-tags/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-tags` | `/product-tags`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/product-tags/edit` | `/product-tags/edit`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/products/add` | `/products/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/products/edit` | `/products/edit`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/products` | `/products`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/rebalance-orders` | `/rebalance-orders`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/send-notifications` | `/send-notifications`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots/add` | `/slots/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots` | `/slots`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/slots/slot-details` | `/slots/slot-details`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/stores/add` | `/stores/add`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/stores/edit` | `/stores/edit`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/stores` | `/stores`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/user-management` | `/user-management`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/users` | `/users`; params?: Router.UnknownInputParams; } | { pathname: `${'/(drawer)'}/vendor-snippets` | `/vendor-snippets`; params?: Router.UnknownInputParams; } | `${'/(drawer)'}/coupons/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/coupons/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/dashboard-banners/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/dashboard-banners/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/manage-orders/order-details/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/manage-orders/order-details/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/product-groupings/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/product-groupings/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/products/detail/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/products/detail/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/slots/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/slots/edit/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `${'/(drawer)'}/user-management/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | `/user-management/${Router.SingleRoutePart}${`?${string}` | `#${string}` | ''}` | { pathname: `${'/(drawer)'}/coupons/edit/[id]` | `/coupons/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/dashboard-banners/edit/[id]` | `/dashboard-banners/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/manage-orders/order-details/[id]` | `/manage-orders/order-details/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/product-groupings/edit/[id]` | `/product-groupings/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/products/detail/[id]` | `/products/detail/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/slots/edit/[id]` | `/slots/edit/[id]`, params: Router.UnknownInputParams & { id: string | number; } } | { pathname: `${'/(drawer)'}/user-management/[id]` | `/user-management/[id]`, params: Router.UnknownInputParams & { id: string | number; } };
}
}
}
diff --git a/apps/admin-ui/app/(drawer)/_layout.tsx b/apps/admin-ui/app/(drawer)/_layout.tsx
index 5be957c..79dd68b 100644
--- a/apps/admin-ui/app/(drawer)/_layout.tsx
+++ b/apps/admin-ui/app/(drawer)/_layout.tsx
@@ -226,9 +226,8 @@ export default function Layout() {
-
-
-
+
+
diff --git a/apps/admin-ui/app/(drawer)/address-management/index.tsx b/apps/admin-ui/app/(drawer)/address-management/index.tsx
deleted file mode 100644
index 69745b8..0000000
--- a/apps/admin-ui/app/(drawer)/address-management/index.tsx
+++ /dev/null
@@ -1,108 +0,0 @@
-import React, { useState } from 'react'
-import { View, Text, TouchableOpacity, ScrollView } from 'react-native'
-import { BottomDialog , tw } from 'common-ui'
-import { trpc } from '@/src/trpc-client'
-import AddressZoneForm from '@/components/AddressZoneForm'
-import AddressPlaceForm from '@/components/AddressPlaceForm'
-import MaterialIcons from '@expo/vector-icons/MaterialIcons'
-
-const AddressManagement: React.FC = () => {
- const [dialogOpen, setDialogOpen] = useState(false)
- const [dialogType, setDialogType] = useState<'zone' | 'place' | null>(null)
- const [expandedZones, setExpandedZones] = useState>(new Set())
-
- const { data: zones, refetch: refetchZones } = trpc.admin.address.getZones.useQuery()
- const { data: areas, refetch: refetchAreas } = trpc.admin.address.getAreas.useQuery()
-
- const createZone = trpc.admin.address.createZone.useMutation({
- onSuccess: () => {
- refetchZones()
- setDialogOpen(false)
- },
- })
-
- const createArea = trpc.admin.address.createArea.useMutation({
- onSuccess: () => {
- refetchAreas()
- setDialogOpen(false)
- },
- })
-
- const handleAddZone = () => {
- setDialogType('zone')
- setDialogOpen(true)
- }
-
- const handleAddPlace = () => {
- setDialogType('place')
- setDialogOpen(true)
- }
-
- const toggleZone = (zoneId: number) => {
- setExpandedZones(prev => {
- const newSet = new Set(prev)
- if (newSet.has(zoneId)) {
- newSet.delete(zoneId)
- } else {
- newSet.add(zoneId)
- }
- return newSet
- })
- }
-
- const groupedAreas = areas?.reduce((acc, area) => {
- if (area.zoneId) {
- if (!acc[area.zoneId]) acc[area.zoneId] = []
- acc[area.zoneId].push(area)
- }
- return acc
- }, {} as Record) || {}
-
- const unzonedAreas = areas?.filter(a => !a.zoneId) || []
-
- return (
-
-
-
- Add Zone
-
-
- Add Place
-
-
-
-
- {zones?.map(zone => (
-
- toggleZone(zone.id)}>
- {zone.zoneName}
-
-
- {expandedZones.has(zone.id) && (
-
- {groupedAreas[zone.id]?.map(area => (
- - {area.placeName}
- )) || No places in this zone}
-
- )}
-
- ))}
-
-
- Unzoned Places
- {unzonedAreas.map(area => (
- - {area.placeName}
- ))}
- {unzonedAreas.length === 0 && No unzoned places}
-
-
-
- setDialogOpen(false)}>
- {dialogType === 'zone' && setDialogOpen(false)} />}
- {dialogType === 'place' && setDialogOpen(false)} />}
-
-
- )
-}
-
-export default AddressManagement
\ No newline at end of file
diff --git a/apps/admin-ui/app/(drawer)/dashboard-banners/index.tsx b/apps/admin-ui/app/(drawer)/dashboard-banners/index.tsx
index 8502cf1..29bc085 100644
--- a/apps/admin-ui/app/(drawer)/dashboard-banners/index.tsx
+++ b/apps/admin-ui/app/(drawer)/dashboard-banners/index.tsx
@@ -464,4 +464,4 @@ export default function DashboardBanners() {
);
-}
\ No newline at end of file
+}
diff --git a/apps/admin-ui/app/(drawer)/dashboard/index.tsx b/apps/admin-ui/app/(drawer)/dashboard/index.tsx
index 037c634..a3de344 100644
--- a/apps/admin-ui/app/(drawer)/dashboard/index.tsx
+++ b/apps/admin-ui/app/(drawer)/dashboard/index.tsx
@@ -176,15 +176,6 @@ export default function Dashboard() {
iconColor: '#F97316',
iconBg: '#FFEDD5',
},
- {
- title: 'Address Management',
- icon: 'location-on',
- description: 'Manage service areas',
- route: '/(drawer)/address-management',
- category: 'settings',
- iconColor: '#EAB308',
- iconBg: '#FEF9C3',
- },
{
title: 'App Constants',
icon: 'settings-applications',
diff --git a/apps/admin-ui/mfa_20_mar_dev.apk b/apps/admin-ui/mfa_20_mar_dev.apk
new file mode 100644
index 0000000..fc0804f
Binary files /dev/null and b/apps/admin-ui/mfa_20_mar_dev.apk differ
diff --git a/apps/backend/.env b/apps/backend/.env
index e127cac..be2c9e2 100755
--- a/apps/backend/.env
+++ b/apps/backend/.env
@@ -17,10 +17,10 @@ S3_REGION=apac
S3_ACCESS_KEY_ID=8fab47503efb9547b50e4fb317e35cc7
S3_SECRET_ACCESS_KEY=47c2eb5636843cf568dda7ad0959a3e42071303f26dbdff94bd45a3c33dcd950
S3_URL=https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com
-S3_BUCKET_NAME=meatfarmer
+S3_BUCKET_NAME=meatfarmer-dev
EXPO_ACCESS_TOKEN=Asvpy8cByRh6T4ksnWScO6PLcio2n35-BwES5zK-
JWT_SECRET=my_meatfarmer_jwt_secret_key
-ASSETS_DOMAIN=https://assets.freshyo.in/
+ASSETS_DOMAIN=https://assets2.freshyo.in/
API_CACHE_KEY=api-cache-dev
# CLOUDFLARE_API_TOKEN=I8Vp4E9TX58E8qEDeH0nTFDS2d2zXNYiXvbs4Ckj
CLOUDFLARE_API_TOKEN=N7jAg5X-RUj_fVfMW6zbfJ8qIYc81TSIKKlbZ6oh
diff --git a/apps/backend/src/dbService.ts b/apps/backend/src/dbService.ts
new file mode 100644
index 0000000..d94595b
--- /dev/null
+++ b/apps/backend/src/dbService.ts
@@ -0,0 +1,15 @@
+// Database Service - Central export for all database-related imports
+// This file re-exports everything from postgresService to provide a clean abstraction layer
+// Implementation is the responsibility of postgresService package
+
+// Re-export database connection
+export { db } from 'postgresService';
+
+// Re-export all schema exports
+export * from 'postgresService';
+
+// Re-export methods from postgresService (implementation lives there)
+export { getBanners, getBannerById, createBanner, updateBanner, deleteBanner } from 'postgresService';
+
+// Re-export types from local types file (to avoid circular dependencies)
+export type { Banner } from './types/db.types';
diff --git a/apps/backend/src/trpc/apis/admin-apis/apis/address.ts b/apps/backend/src/trpc/apis/admin-apis/apis/address.ts
deleted file mode 100644
index 019b895..0000000
--- a/apps/backend/src/trpc/apis/admin-apis/apis/address.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { z } from 'zod';
-import { addressZones, addressAreas } from '@/src/db/schema'
-import { eq, desc } from 'drizzle-orm';
-import { db } from '@/src/db/db_index'
-import { router,protectedProcedure } from '@/src/trpc/trpc-index'
-
-const addressRouter = router({
- getZones: protectedProcedure.query(async () => {
- const zones = await db.select().from(addressZones).orderBy(desc(addressZones.addedAt));
- return zones
- }),
-
- getAreas: protectedProcedure.query(async () => {
- const areas = await db.select().from(addressAreas).orderBy(desc(addressAreas.createdAt));
- return areas
- }),
-
- createZone: protectedProcedure.input(z.object({ zoneName: z.string().min(1) })).mutation(async ({ input }) => {
-
- const zone = await db.insert(addressZones).values({ zoneName: input.zoneName }).returning();
- return {zone: zone};
- }),
-
- createArea: protectedProcedure.input(z.object({ placeName: z.string().min(1), zoneId: z.number().nullable() })).mutation(async ({ input }) => {
- const area = await db.insert(addressAreas).values({ placeName: input.placeName, zoneId: input.zoneId }).returning();
- return {area};
- }),
-
- // TODO: Add update and delete mutations if needed
-});
-
-export default addressRouter;
\ No newline at end of file
diff --git a/apps/backend/src/trpc/apis/admin-apis/apis/admin-trpc-index.ts b/apps/backend/src/trpc/apis/admin-apis/apis/admin-trpc-index.ts
index 3af0292..ede995e 100644
--- a/apps/backend/src/trpc/apis/admin-apis/apis/admin-trpc-index.ts
+++ b/apps/backend/src/trpc/apis/admin-apis/apis/admin-trpc-index.ts
@@ -2,7 +2,6 @@
import { router } from '@/src/trpc/trpc-index'
import { complaintRouter } from '@/src/trpc/apis/admin-apis/apis/complaint'
import { couponRouter } from '@/src/trpc/apis/admin-apis/apis/coupon'
-import { cancelledOrdersRouter } from '@/src/trpc/apis/admin-apis/apis/cancelled-orders'
import { orderRouter } from '@/src/trpc/apis/admin-apis/apis/order'
import { vendorSnippetsRouter } from '@/src/trpc/apis/admin-apis/apis/vendor-snippets'
import { slotsRouter } from '@/src/trpc/apis/admin-apis/apis/slots'
@@ -10,7 +9,6 @@ import { productRouter } from '@/src/trpc/apis/admin-apis/apis/product'
import { staffUserRouter } from '@/src/trpc/apis/admin-apis/apis/staff-user'
import { storeRouter } from '@/src/trpc/apis/admin-apis/apis/store'
import { adminPaymentsRouter } from '@/src/trpc/apis/admin-apis/apis/payments'
-import addressRouter from '@/src/trpc/apis/admin-apis/apis/address'
import { bannerRouter } from '@/src/trpc/apis/admin-apis/apis/banner'
import { userRouter } from '@/src/trpc/apis/admin-apis/apis/user'
import { constRouter } from '@/src/trpc/apis/admin-apis/apis/const'
@@ -18,7 +16,6 @@ import { constRouter } from '@/src/trpc/apis/admin-apis/apis/const'
export const adminRouter = router({
complaint: complaintRouter,
coupon: couponRouter,
- cancelledOrders: cancelledOrdersRouter,
order: orderRouter,
vendorSnippets: vendorSnippetsRouter,
slots: slotsRouter,
@@ -26,7 +23,6 @@ export const adminRouter = router({
staffUser: staffUserRouter,
store: storeRouter,
payments: adminPaymentsRouter,
- address: addressRouter,
banner: bannerRouter,
user: userRouter,
const: constRouter,
diff --git a/apps/backend/src/trpc/apis/admin-apis/apis/banner.ts b/apps/backend/src/trpc/apis/admin-apis/apis/banner.ts
index dde8d91..2922330 100644
--- a/apps/backend/src/trpc/apis/admin-apis/apis/banner.ts
+++ b/apps/backend/src/trpc/apis/admin-apis/apis/banner.ts
@@ -1,23 +1,34 @@
import { z } from 'zod';
-import { db } from '@/src/db/db_index'
-import { homeBanners } from '@/src/db/schema'
-import { eq, and, desc, sql } from 'drizzle-orm';
import { protectedProcedure, router } from '@/src/trpc/trpc-index'
import { extractKeyFromPresignedUrl, generateSignedUrlFromS3Url } from '@/src/lib/s3-client'
import { ApiError } from '@/src/lib/api-error';
import { scheduleStoreInitialization } from '@/src/stores/store-initializer'
+import {
+ getBanners as getBannersFromDb,
+ getBannerById as getBannerByIdFromDb,
+ createBanner as createBannerInDb,
+ updateBanner as updateBannerInDb,
+ deleteBanner as deleteBannerFromDb,
+} from '@/src/dbService'
+import type { Banner } from '@packages/shared'
export const bannerRouter = router({
// Get all banners
getBanners: protectedProcedure
- .query(async () => {
+ .query(async (): Promise<{ banners: Banner[] }> => {
try {
- const banners = await db.query.homeBanners.findMany({
- orderBy: desc(homeBanners.createdAt), // Order by creation date instead
+ // Using dbService helper (new implementation)
+ const banners = await getBannersFromDb();
+
+
+ // Old implementation - direct DB query:
+ // const banners = await db.query.homeBanners.findMany({
+ // orderBy: desc(homeBanners.createdAt), // Order by creation date instead
// Removed product relationship since we now use productIds array
- });
+ // });
+
// Convert S3 keys to signed URLs for client
const bannersWithSignedUrls = await Promise.all(
@@ -55,11 +66,17 @@ export const bannerRouter = router({
// Get single banner by ID
getBanner: protectedProcedure
.input(z.object({ id: z.number() }))
- .query(async ({ input }) => {
+ .query(async ({ input }): Promise => {
+ // Using dbService helper (new implementation)
+ const banner = await getBannerByIdFromDb(input.id);
+
+ /*
+ // Old implementation - direct DB query:
const banner = await db.query.homeBanners.findFirst({
where: eq(homeBanners.id, input.id),
// Removed product relationship since we now use productIds array
});
+ */
if (banner) {
try {
@@ -91,8 +108,22 @@ export const bannerRouter = router({
redirectUrl: z.string().url().optional(),
// serialNum removed completely
}))
- .mutation(async ({ input }) => {
+ .mutation(async ({ input }): Promise => {
try {
+ // Using dbService helper (new implementation)
+ const imageUrl = extractKeyFromPresignedUrl(input.imageUrl)
+ const banner = await createBannerInDb({
+ name: input.name,
+ imageUrl: imageUrl,
+ description: input.description ?? null,
+ productIds: input.productIds || [],
+ redirectUrl: input.redirectUrl ?? null,
+ serialNum: 999, // Default value, not used
+ isActive: false, // Default to inactive
+ });
+
+ /*
+ // Old implementation - direct DB query:
const imageUrl = extractKeyFromPresignedUrl(input.imageUrl)
const [banner] = await db.insert(homeBanners).values({
name: input.name,
@@ -103,6 +134,7 @@ export const bannerRouter = router({
serialNum: 999, // Default value, not used
isActive: false, // Default to inactive
}).returning();
+ */
// Reinitialize stores to reflect changes
scheduleStoreInitialization()
@@ -126,9 +158,28 @@ export const bannerRouter = router({
serialNum: z.number().nullable().optional(),
isActive: z.boolean().optional(),
}))
- .mutation(async ({ input }) => {
+ .mutation(async ({ input }): Promise => {
try {
-
+ // Using dbService helper (new implementation)
+ const { id, ...updateData } = input;
+
+ // Extract S3 key from presigned URL if imageUrl is provided
+ const processedData = {
+ ...updateData,
+ ...(updateData.imageUrl && {
+ imageUrl: extractKeyFromPresignedUrl(updateData.imageUrl)
+ }),
+ };
+
+ // Handle serialNum null case
+ if ('serialNum' in processedData && processedData.serialNum === null) {
+ processedData.serialNum = null;
+ }
+
+ const banner = await updateBannerInDb(id, processedData);
+
+ /*
+ // Old implementation - direct DB query:
const { id, ...updateData } = input;
const incomingProductIds = input.productIds;
// Extract S3 key from presigned URL if imageUrl is provided
@@ -150,6 +201,7 @@ export const bannerRouter = router({
.set({ ...finalData, lastUpdated: new Date(), })
.where(eq(homeBanners.id, id))
.returning();
+ */
// Reinitialize stores to reflect changes
scheduleStoreInitialization()
@@ -164,8 +216,14 @@ export const bannerRouter = router({
// Delete banner
deleteBanner: protectedProcedure
.input(z.object({ id: z.number() }))
- .mutation(async ({ input }) => {
+ .mutation(async ({ input }): Promise<{ success: true }> => {
+ // Using dbService helper (new implementation)
+ await deleteBannerFromDb(input.id);
+
+ /*
+ // Old implementation - direct DB query:
await db.delete(homeBanners).where(eq(homeBanners.id, input.id));
+ */
// Reinitialize stores to reflect changes
scheduleStoreInitialization()
diff --git a/apps/backend/src/trpc/apis/admin-apis/apis/cancelled-orders.ts b/apps/backend/src/trpc/apis/admin-apis/apis/cancelled-orders.ts
deleted file mode 100644
index 14c0b26..0000000
--- a/apps/backend/src/trpc/apis/admin-apis/apis/cancelled-orders.ts
+++ /dev/null
@@ -1,179 +0,0 @@
-import { router, protectedProcedure } from '@/src/trpc/trpc-index'
-import { z } from 'zod';
-import { db } from '@/src/db/db_index'
-import { orders, orderStatus, users, addresses, orderItems, productInfo, units, refunds } from '@/src/db/schema'
-import { eq, desc } from 'drizzle-orm';
-
-const updateCancellationReviewSchema = z.object({
- orderId: z.number(),
- cancellationReviewed: z.boolean(),
- adminNotes: z.string().optional(),
-});
-
-const updateRefundSchema = z.object({
- orderId: z.number(),
- isRefundDone: z.boolean(),
-});
-
-export const cancelledOrdersRouter = router({
- getAll: protectedProcedure
- .query(async () => {
- // First get cancelled order statuses with order details
- const cancelledOrderStatuses = await db.query.orderStatus.findMany({
- where: eq(orderStatus.isCancelled, true),
- with: {
- order: {
- with: {
- user: true,
- address: true,
- orderItems: {
- with: {
- product: {
- with: {
- unit: true,
- },
- },
- },
- },
- refunds: true,
- },
- },
- },
- orderBy: [desc(orderStatus.orderTime)],
- });
-
- const filteredStatuses = cancelledOrderStatuses.filter(status => {
- return status.order.isCod || status.paymentStatus === 'success';
- });
-
- return filteredStatuses.map(status => {
- const refund = status.order.refunds[0];
- return {
- id: status.order.id,
- readableId: status.order.id,
- customerName: `${status.order.user.name}`,
- address: `${status.order.address.addressLine1}, ${status.order.address.city}`,
- totalAmount: status.order.totalAmount,
- cancellationReviewed: status.cancellationReviewed || false,
- isRefundDone: refund?.refundStatus === 'processed' || false,
- adminNotes: status.order.adminNotes,
- cancelReason: status.cancelReason,
- paymentMode: status.order.isCod ? 'COD' : 'Online',
- paymentStatus: status.paymentStatus || 'pending',
- items: status.order.orderItems.map(item => ({
- name: item.product.name,
- quantity: item.quantity,
- price: item.price,
- unit: item.product.unit?.shortNotation,
- amount: parseFloat(item.price.toString()) * parseFloat(item.quantity || '0'),
- })),
- createdAt: status.order.createdAt,
- };
- });
- }),
-
- updateReview: protectedProcedure
- .input(updateCancellationReviewSchema)
- .mutation(async ({ input }) => {
- const { orderId, cancellationReviewed, adminNotes } = input;
-
- const result = await db.update(orderStatus)
- .set({
- cancellationReviewed,
- cancellationAdminNotes: adminNotes || null,
- cancellationReviewedAt: new Date(),
- })
- .where(eq(orderStatus.orderId, orderId))
- .returning();
-
- if (result.length === 0) {
- throw new Error("Cancellation record not found");
- }
-
- return result[0];
- }),
-
- getById: protectedProcedure
- .input(z.object({ id: z.number() }))
- .query(async ({ input }) => {
- const { id } = input;
-
- // Get cancelled order with full details
- const cancelledOrderStatus = await db.query.orderStatus.findFirst({
- where: eq(orderStatus.id, id),
- with: {
- order: {
- with: {
- user: true,
- address: true,
- orderItems: {
- with: {
- product: {
- with: {
- unit: true,
- },
- },
- },
- },
- },
- },
- },
- });
-
- if (!cancelledOrderStatus || !cancelledOrderStatus.isCancelled) {
- throw new Error("Cancelled order not found");
- }
-
- // Get refund details separately
- const refund = await db.query.refunds.findFirst({
- where: eq(refunds.orderId, cancelledOrderStatus.orderId),
- });
-
- const order = cancelledOrderStatus.order;
-
- // Format the response similar to the getAll method
- const formattedOrder = {
- id: order.id,
- readableId: order.id,
- customerName: order.user.name,
- address: `${order.address.addressLine1}${order.address.addressLine2 ? ', ' + order.address.addressLine2 : ''}, ${order.address.city}, ${order.address.state} ${order.address.pincode}`,
- totalAmount: order.totalAmount,
- cancellationReviewed: cancelledOrderStatus.cancellationReviewed || false,
- isRefundDone: refund?.refundStatus === 'processed' || false,
- adminNotes: cancelledOrderStatus.cancellationAdminNotes || null,
- cancelReason: cancelledOrderStatus.cancelReason || null,
- items: order.orderItems.map((item: any) => ({
- name: item.product.name,
- quantity: item.quantity,
- price: parseFloat(item.price.toString()),
- unit: item.product.unit?.shortNotation || 'unit',
- amount: parseFloat(item.price.toString()) * parseFloat(item.quantity),
- image: item.product.images?.[0] || null,
- })),
- createdAt: order.createdAt.toISOString(),
- };
-
- return { order: formattedOrder };
- }),
-
- updateRefund: protectedProcedure
- .input(updateRefundSchema)
- .mutation(async ({ input }) => {
- const { orderId, isRefundDone } = input;
-
- const refundStatus = isRefundDone ? 'processed' : 'none';
- const result = await db.update(refunds)
- .set({
- refundStatus,
- refundProcessedAt: isRefundDone ? new Date() : null,
- })
- .where(eq(refunds.orderId, orderId))
- .returning();
-
- if (result.length === 0) {
- throw new Error("Cancellation record not found");
- }
-
- return result[0];
- }),
-});
\ No newline at end of file
diff --git a/apps/backend/src/types/db.types.ts b/apps/backend/src/types/db.types.ts
new file mode 100644
index 0000000..50dbdf9
--- /dev/null
+++ b/apps/backend/src/types/db.types.ts
@@ -0,0 +1,4 @@
+// Database Types - Re-exports from shared package
+// Central type definitions for backend database operations
+
+export type { Banner } from '@packages/shared';
diff --git a/apps/backend/tsconfig.json b/apps/backend/tsconfig.json
index 137ac12..b74475b 100755
--- a/apps/backend/tsconfig.json
+++ b/apps/backend/tsconfig.json
@@ -35,6 +35,8 @@
"@commonTypes/*": ["../../packages/ui/shared-types/*"],
"@packages/shared": ["../../packages/shared"],
"@packages/shared/*": ["../../packages/shared/*"],
+ "postgresService": ["../../packages/db_helper_postgres"],
+ "postgresService/*": ["../../packages/db_helper_postgres/*"],
"global-shared": ["../../packages/shared"],
"global-shared/*": ["../../packages/shared/*"]
},
diff --git a/apps/fallback-ui/src/router.tsx b/apps/fallback-ui/src/router.tsx
index b21d2e5..7c9e4c3 100644
--- a/apps/fallback-ui/src/router.tsx
+++ b/apps/fallback-ui/src/router.tsx
@@ -11,6 +11,7 @@ import { CreateCouponRoute } from './routes/create-coupon'
import { LocationMarkerRoute } from './routes/location-marker'
import { UserConnectRoute } from './routes/user-connect'
import Inauguration from './routes/inauguration'
+import { DemoRoute } from './routes/demo'
import { AuthWrapper } from './components/AuthWrapper'
import { SuperAdminGuard } from './components/SuperAdminGuard'
import { cn } from '@/lib/utils'
@@ -124,6 +125,16 @@ const locationMarkerRoute = new Route({
)
})
+const demoRoute = new Route({
+ getParentRoute: () => rootRoute,
+ path: '/demo',
+ component: () => (
+ Loading demo…
}>
+
+
+ )
+})
+
const routeTree = rootRoute.addChildren([
dashboardRoute,
vendorOrderListRoute,
@@ -133,7 +144,8 @@ const routeTree = rootRoute.addChildren([
createCouponRoute,
userConnectRoute,
locationMarkerRoute,
- inaugurationRoute
+ inaugurationRoute,
+ demoRoute
])
export function createAppRouter() {
diff --git a/apps/fallback-ui/src/routes/demo.tsx b/apps/fallback-ui/src/routes/demo.tsx
new file mode 100644
index 0000000..830332a
--- /dev/null
+++ b/apps/fallback-ui/src/routes/demo.tsx
@@ -0,0 +1,259 @@
+import { useState } from 'react'
+import { getAuthToken } from '@/services/auth'
+
+const API_BASE_URL = import.meta.env.VITE_API_URL || 'http://localhost:4000'
+
+export function DemoRoute() {
+ const [method, setMethod] = useState('GET')
+ const [endpoint, setEndpoint] = useState('/api/test')
+ const [headers, setHeaders] = useState('{}')
+ const [body, setBody] = useState('{}')
+ const [response, setResponse] = useState(null)
+ const [error, setError] = useState('')
+ const [loading, setLoading] = useState(false)
+ const [history, setHistory] = useState>([])
+
+ const handleSubmit = async () => {
+ setLoading(true)
+ setError('')
+ setResponse(null)
+
+ try {
+ const token = await getAuthToken()
+ const url = `${API_BASE_URL}${endpoint}`
+
+ let parsedHeaders: Record = {}
+ try {
+ parsedHeaders = JSON.parse(headers)
+ } catch {
+ throw new Error('Invalid headers JSON')
+ }
+
+ const fetchOptions: RequestInit = {
+ method,
+ headers: {
+ 'Content-Type': 'application/json',
+ ...(token && { Authorization: `Bearer ${token}` }),
+ ...parsedHeaders,
+ },
+ }
+
+ if (method !== 'GET' && method !== 'HEAD') {
+ try {
+ const parsedBody = JSON.parse(body)
+ fetchOptions.body = JSON.stringify(parsedBody)
+ } catch {
+ throw new Error('Invalid body JSON')
+ }
+ }
+
+ const startTime = performance.now()
+ const res = await fetch(url, fetchOptions)
+ const endTime = performance.now()
+ const duration = Math.round(endTime - startTime)
+
+ let data
+ const contentType = res.headers.get('content-type')
+ if (contentType && contentType.includes('application/json')) {
+ data = await res.json()
+ } else {
+ data = await res.text()
+ }
+
+ setResponse({
+ status: res.status,
+ statusText: res.statusText,
+ duration: `${duration}ms`,
+ headers: Object.fromEntries(res.headers.entries()),
+ data,
+ })
+
+ // Add to history
+ setHistory(prev => [
+ { method, endpoint, timestamp: new Date().toLocaleTimeString() },
+ ...prev.slice(0, 9), // Keep last 10
+ ])
+ } catch (err: any) {
+ setError(err.message || 'An error occurred')
+ } finally {
+ setLoading(false)
+ }
+ }
+
+ const loadFromHistory = (item: { method: string; endpoint: string }) => {
+ setMethod(item.method)
+ setEndpoint(item.endpoint)
+ }
+
+ const getStatusColor = (status: number) => {
+ if (status >= 200 && status < 300) return 'bg-green-500'
+ if (status >= 300 && status < 400) return 'bg-yellow-500'
+ if (status >= 400) return 'bg-red-500'
+ return 'bg-gray-500'
+ }
+
+ return (
+
+
+
API Demo & Testing
+
+ {API_BASE_URL}
+
+
+
+
+ {/* Request Panel */}
+
+
Request
+
+
+
+ ) => setEndpoint(e.target.value)}
+ className="flex-1 px-4 py-2 border rounded-md"
+ />
+
+
+
+
+
+
+
+ {method !== 'GET' && method !== 'HEAD' && (
+
+
+
+ )}
+
+
+
+ {/* History Panel */}
+
+
History
+
+ {history.length === 0 ? (
+
No requests yet
+ ) : (
+ history.map((item, index) => (
+
+ ))
+ )}
+
+
+
+ {/* Response Panel */}
+
+
Response
+ {error ? (
+
+ ) : response ? (
+
+
+
+ {response.status} {response.statusText}
+
+
+ {response.duration}
+
+
+
+
+
+
+ {JSON.stringify(response.headers, null, 2)}
+
+
+
+
+
+
+ {typeof response.data === 'string'
+ ? response.data
+ : JSON.stringify(response.data, null, 2)}
+
+
+
+ ) : (
+
+
Send a request to see the response
+
+ )}
+
+
+
+ {/* Quick Links */}
+
+
Quick Test Endpoints
+
+ {[
+ { method: 'GET', endpoint: '/trpc/user.banner.getActiveBanners' },
+ { method: 'GET', endpoint: '/trpc/user.product.getAllProducts' },
+ { method: 'GET', endpoint: '/trpc/user.user.getCurrentUser' },
+ { method: 'POST', endpoint: '/trpc/user.auth.login' },
+ ].map((item, index) => (
+
+ ))}
+
+
+
+ )
+}
diff --git a/apps/user-ui/mfu_20_mar_dev.apk b/apps/user-ui/mfu_20_mar_dev.apk
new file mode 100644
index 0000000..3ff51ac
Binary files /dev/null and b/apps/user-ui/mfu_20_mar_dev.apk differ
diff --git a/bun.lock b/bun.lock
index f94e3c2..8083718 100644
--- a/bun.lock
+++ b/bun.lock
@@ -272,6 +272,22 @@
"typescript": "~5.8.3",
},
},
+ "packages/db_helper_postgres": {
+ "name": "@packages/db_helper_postgres",
+ "version": "1.0.0",
+ "dependencies": {
+ "dotenv": "^17.2.1",
+ "drizzle-orm": "^0.44.5",
+ "pg": "^8.16.3",
+ },
+ "devDependencies": {
+ "@types/node": "^24.5.2",
+ "@types/pg": "^8.15.5",
+ "drizzle-kit": "^0.31.4",
+ "tsx": "^4.20.5",
+ "typescript": "^5.9.2",
+ },
+ },
"packages/shared": {
"name": "@packages/shared",
"version": "1.0.0",
@@ -839,6 +855,8 @@
"@nolyfill/is-core-module": ["@nolyfill/is-core-module@1.0.39", "", {}, "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA=="],
+ "@packages/db_helper_postgres": ["@packages/db_helper_postgres@workspace:packages/db_helper_postgres"],
+
"@packages/shared": ["@packages/shared@workspace:packages/shared"],
"@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="],
@@ -3437,6 +3455,10 @@
"@maplibre/maplibre-gl-style-spec/quickselect": ["quickselect@2.0.0", "", {}, "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw=="],
+ "@packages/db_helper_postgres/drizzle-orm": ["drizzle-orm@0.44.7", "", { "peerDependencies": { "@aws-sdk/client-rds-data": ">=3", "@cloudflare/workers-types": ">=4", "@electric-sql/pglite": ">=0.2.0", "@libsql/client": ">=0.10.0", "@libsql/client-wasm": ">=0.10.0", "@neondatabase/serverless": ">=0.10.0", "@op-engineering/op-sqlite": ">=2", "@opentelemetry/api": "^1.4.1", "@planetscale/database": ">=1.13", "@prisma/client": "*", "@tidbcloud/serverless": "*", "@types/better-sqlite3": "*", "@types/pg": "*", "@types/sql.js": "*", "@upstash/redis": ">=1.34.7", "@vercel/postgres": ">=0.8.0", "@xata.io/client": "*", "better-sqlite3": ">=7", "bun-types": "*", "expo-sqlite": ">=14.0.0", "gel": ">=2", "knex": "*", "kysely": "*", "mysql2": ">=2", "pg": ">=8", "postgres": ">=3", "sql.js": ">=1", "sqlite3": ">=5" }, "optionalPeers": ["@aws-sdk/client-rds-data", "@cloudflare/workers-types", "@electric-sql/pglite", "@libsql/client", "@libsql/client-wasm", "@neondatabase/serverless", "@op-engineering/op-sqlite", "@opentelemetry/api", "@planetscale/database", "@prisma/client", "@tidbcloud/serverless", "@types/better-sqlite3", "@types/pg", "@types/sql.js", "@upstash/redis", "@vercel/postgres", "@xata.io/client", "better-sqlite3", "bun-types", "expo-sqlite", "gel", "knex", "kysely", "mysql2", "pg", "postgres", "sql.js", "sqlite3"] }, "sha512-quIpnYznjU9lHshEOAYLoZ9s3jweleHlZIAWR/jX9gAWNg/JhQ1wj0KGRf7/Zm+obRrYd9GjPVJg790QY9N5AQ=="],
+
+ "@packages/db_helper_postgres/typescript": ["typescript@5.9.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw=="],
+
"@react-native/community-cli-plugin/debug": ["debug@2.6.9", "", { "dependencies": { "ms": "2.0.0" } }, "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA=="],
"@react-native/community-cli-plugin/semver": ["semver@7.7.4", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA=="],
diff --git a/packages/db_helper_postgres/.env b/packages/db_helper_postgres/.env
new file mode 100644
index 0000000..e127cac
--- /dev/null
+++ b/packages/db_helper_postgres/.env
@@ -0,0 +1,42 @@
+ENV_MODE=PROD
+DATABASE_URL=postgresql://postgres:meatfarmer_master_password@57.128.212.174:7447/meatfarmer #technocracy
+# DATABASE_URL=postgres://postgres:meatfarmer_master_password@5.223.55.14:7447/meatfarmer #hetzner
+PHONE_PE_BASE_URL=https://api-preprod.phonepe.com/
+PHONE_PE_CLIENT_ID=TEST-M23F2IGP34ZAR_25090
+PHONE_PE_CLIENT_VERSION=1
+PHONE_PE_CLIENT_SECRET=MTU1MmIzOTgtM2Q0Mi00N2M5LTkyMWUtNzBiMjdmYzVmZWUy
+PHONE_PE_MERCHANT_ID=M23F2IGP34ZAR
+
+# S3_REGION=ap-hyderabad-1
+# S3_REGION=sgp
+# S3_ACCESS_KEY_ID=52932a33abce40b38b559dadccab640f
+# S3_SECRET_ACCESS_KEY=d287998b696d4a1c912e727f6394e53b
+# S3_URL=https://s3.sgp.io.cloud.ovh.net/
+# S3_BUCKET_NAME=theobjectstore
+S3_REGION=apac
+S3_ACCESS_KEY_ID=8fab47503efb9547b50e4fb317e35cc7
+S3_SECRET_ACCESS_KEY=47c2eb5636843cf568dda7ad0959a3e42071303f26dbdff94bd45a3c33dcd950
+S3_URL=https://da9b1aa7c1951c23e2c0c3246ba68a58.r2.cloudflarestorage.com
+S3_BUCKET_NAME=meatfarmer
+EXPO_ACCESS_TOKEN=Asvpy8cByRh6T4ksnWScO6PLcio2n35-BwES5zK-
+JWT_SECRET=my_meatfarmer_jwt_secret_key
+ASSETS_DOMAIN=https://assets.freshyo.in/
+API_CACHE_KEY=api-cache-dev
+# CLOUDFLARE_API_TOKEN=I8Vp4E9TX58E8qEDeH0nTFDS2d2zXNYiXvbs4Ckj
+CLOUDFLARE_API_TOKEN=N7jAg5X-RUj_fVfMW6zbfJ8qIYc81TSIKKlbZ6oh
+CLOUDFLARE_ZONE_ID=edefbf750bfc3ff26ccd11e8e28dc8d7
+# REDIS_URL=redis://default:redis_shafi_password@5.223.55.14:6379
+REDIS_URL=redis://default:redis_shafi_password@57.128.212.174:6379
+APP_URL=http://localhost:4000
+RAZORPAY_KEY=rzp_test_RdCBBUJ56NLaJK
+RAZORPAY_SECRET=namEwKBE1ypWxH0QDVg6fWOe
+OTP_SENDER_AUTH_TOKEN=eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJDLTM5OENEMkJDRTM0MjQ4OCIsImlhdCI6MTc0Nzg0MTEwMywiZXhwIjoxOTA1NTIxMTAzfQ.IV64ofVKjcwveIanxu_P2XlACtPeA9sJQ74uM53osDeyUXsFv0rwkCl6NNBIX93s_wnh4MKITLbcF_ClwmFQ0A
+
+MIN_ORDER_VALUE=300
+DELIVERY_CHARGE=20
+
+# Telegram Configuration
+TELEGRAM_BOT_TOKEN=8410461852:AAGXQCwRPFbndqwTgLJh8kYxST4Z0vgh72U
+TELEGRAM_CHAT_IDS=5147760058
+# TELEGRAM_BOT_TOKEN=8410461852:AAGXQCwRPFbndqwTgLJh8kYxST4Z0vgh72U
+# TELEGRAM_CHAT_IDS=-5075171894
diff --git a/packages/db_helper_postgres/.env.example b/packages/db_helper_postgres/.env.example
new file mode 100644
index 0000000..6d4184e
--- /dev/null
+++ b/packages/db_helper_postgres/.env.example
@@ -0,0 +1,2 @@
+# Copy this to .env and fill in your database URL
+DATABASE_URL=postgresql://username:password@localhost:5432/dbname
diff --git a/packages/db_helper_postgres/README.md b/packages/db_helper_postgres/README.md
new file mode 100644
index 0000000..46a261a
--- /dev/null
+++ b/packages/db_helper_postgres/README.md
@@ -0,0 +1,38 @@
+# Database Helper - PostgreSQL
+
+This package contains all database-related configuration, migrations, and schema definitions for the PostgreSQL database.
+
+## Structure
+
+- `src/db/` - Database source files
+ - `schema.ts` - Drizzle ORM schema definitions
+ - `db_index.ts` - Database connection and client setup
+ - `types.ts` - Database types
+ - `seed.ts` - Database seeding script
+ - `porter.ts` - Data migration utilities
+- `drizzle/` - Migration files generated by Drizzle Kit
+- `drizzle.config.ts` - Drizzle Kit configuration
+
+## Environment Variables
+
+Create a `.env` file with:
+
+```
+DATABASE_URL=postgresql://username:password@localhost:5432/dbname
+```
+
+## Scripts
+
+- `npm run migrate` - Generate new migration files
+- `npm run db:push` - Push schema changes to database
+- `npm run db:seed` - Run database seeding
+- `npm run db:studio` - Open Drizzle Studio
+
+## Usage
+
+This package can be used by other packages/apps in the monorepo:
+
+```typescript
+import { db } from '@packages/db_helper_postgres/src/db/db_index';
+import { users } from '@packages/db_helper_postgres/src/db/schema';
+```
diff --git a/packages/db_helper_postgres/drizzle.config.ts b/packages/db_helper_postgres/drizzle.config.ts
new file mode 100644
index 0000000..0b5c1c9
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle.config.ts
@@ -0,0 +1,11 @@
+import 'dotenv/config';
+import { defineConfig } from 'drizzle-kit';
+
+export default defineConfig({
+ out: './drizzle',
+ schema: './src/db/schema.ts',
+ dialect: 'postgresql',
+ dbCredentials: {
+ url: process.env.DATABASE_URL!,
+ },
+});
diff --git a/packages/db_helper_postgres/drizzle/0000_colorful_tinkerer.sql b/packages/db_helper_postgres/drizzle/0000_colorful_tinkerer.sql
new file mode 100644
index 0000000..49fc610
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0000_colorful_tinkerer.sql
@@ -0,0 +1,124 @@
+CREATE TYPE "public"."order_status" AS ENUM('pending', 'delivered', 'cancelled');--> statement-breakpoint
+CREATE TABLE "mf"."addresses" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."addresses_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "user_id" integer NOT NULL,
+ "address" varchar(500) NOT NULL,
+ "is_default" boolean DEFAULT false NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."cart_items" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."cart_items_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "user_id" integer NOT NULL,
+ "product_id" integer NOT NULL,
+ "quantity" numeric(10, 2) NOT NULL,
+ "added_at" timestamp DEFAULT now() NOT NULL,
+ CONSTRAINT "unique_user_product" UNIQUE("user_id","product_id")
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."delivery_slot_info" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."delivery_slot_info_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "deliveryTime" timestamp NOT NULL,
+ "freezeTime" timestamp NOT NULL,
+ "is_active" boolean DEFAULT true NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."notifications" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."notifications_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "user_id" integer NOT NULL,
+ "title" varchar(255) NOT NULL,
+ "body" varchar(512) NOT NULL,
+ "type" varchar(50),
+ "is_read" boolean DEFAULT false NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."order_items" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."order_items_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "order_id" integer NOT NULL,
+ "product_id" integer NOT NULL,
+ "quantity" numeric(10, 2) NOT NULL,
+ "price" numeric(10, 2) NOT NULL,
+ "amount" numeric(10, 2) NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."orders" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."orders_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "user_id" integer NOT NULL,
+ "address_id" integer NOT NULL,
+ "slot_id" integer NOT NULL,
+ "total_amount" numeric(10, 2) NOT NULL,
+ "status" "order_status" DEFAULT 'pending' NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."payments" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."payments_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "order_id" integer NOT NULL,
+ "status" varchar(50) NOT NULL,
+ "gateway" varchar(50) NOT NULL,
+ "gateway_order_id" varchar(255),
+ "amount" numeric(10, 2) NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."product_categories" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."product_categories_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "name" varchar(255) NOT NULL,
+ "description" varchar(500)
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."product_info" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."product_info_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "name" varchar(255) NOT NULL,
+ "short_description" varchar(500),
+ "long_description" varchar(1000),
+ "unit_id" integer NOT NULL,
+ "price" numeric(10, 2) NOT NULL,
+ "images" jsonb,
+ "created_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."product_slots" (
+ "product_id" integer NOT NULL,
+ "slot_id" integer NOT NULL,
+ CONSTRAINT "product_slot_pk" UNIQUE("product_id","slot_id")
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."special_deals" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."special_deals_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "product_id" integer NOT NULL,
+ "quantity" numeric(10, 2) NOT NULL,
+ "price" numeric(10, 2) NOT NULL,
+ "valid_till" timestamp NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."units" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."units_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "short_notation" varchar(50) NOT NULL,
+ "full_name" varchar(100) NOT NULL,
+ CONSTRAINT "unique_short_notation" UNIQUE("short_notation")
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."users" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."users_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "name" varchar(255) NOT NULL,
+ "email" varchar(255),
+ "mobile" varchar(255),
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ CONSTRAINT "unique_email" UNIQUE("email")
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."addresses" ADD CONSTRAINT "addresses_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."cart_items" ADD CONSTRAINT "cart_items_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."cart_items" ADD CONSTRAINT "cart_items_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."notifications" ADD CONSTRAINT "notifications_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."order_items" ADD CONSTRAINT "order_items_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."order_items" ADD CONSTRAINT "order_items_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."orders" ADD CONSTRAINT "orders_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."orders" ADD CONSTRAINT "orders_address_id_addresses_id_fk" FOREIGN KEY ("address_id") REFERENCES "mf"."addresses"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."orders" ADD CONSTRAINT "orders_slot_id_delivery_slot_info_id_fk" FOREIGN KEY ("slot_id") REFERENCES "mf"."delivery_slot_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."payments" ADD CONSTRAINT "payments_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."product_info" ADD CONSTRAINT "product_info_unit_id_units_id_fk" FOREIGN KEY ("unit_id") REFERENCES "mf"."units"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."product_slots" ADD CONSTRAINT "product_slots_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."product_slots" ADD CONSTRAINT "product_slots_slot_id_delivery_slot_info_id_fk" FOREIGN KEY ("slot_id") REFERENCES "mf"."delivery_slot_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."special_deals" ADD CONSTRAINT "special_deals_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0001_busy_titania.sql b/packages/db_helper_postgres/drizzle/0001_busy_titania.sql
new file mode 100644
index 0000000..6d2f646
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0001_busy_titania.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "mf"."delivery_slot_info" RENAME COLUMN "deliveryTime" TO "delivery_time";--> statement-breakpoint
+ALTER TABLE "mf"."delivery_slot_info" RENAME COLUMN "freezeTime" TO "freeze_time";
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0002_wandering_lifeguard.sql b/packages/db_helper_postgres/drizzle/0002_wandering_lifeguard.sql
new file mode 100644
index 0000000..e5b41f7
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0002_wandering_lifeguard.sql
@@ -0,0 +1,9 @@
+CREATE TABLE "mf"."user_creds" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."user_creds_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "user_id" integer NOT NULL,
+ "user_password" varchar(255) NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ CONSTRAINT "unique_user_cred" UNIQUE("user_id")
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."user_creds" ADD CONSTRAINT "user_creds_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0003_tricky_the_twelve.sql b/packages/db_helper_postgres/drizzle/0003_tricky_the_twelve.sql
new file mode 100644
index 0000000..986274b
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0003_tricky_the_twelve.sql
@@ -0,0 +1,41 @@
+CREATE TABLE "mf"."order_status" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."order_status_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "order_time" timestamp DEFAULT now() NOT NULL,
+ "user_id" integer NOT NULL,
+ "order_id" integer NOT NULL,
+ "is_packaged" boolean DEFAULT false NOT NULL,
+ "is_delivered" boolean DEFAULT false NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."payment_info" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."payment_info_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "status" varchar(50) NOT NULL,
+ "gateway" varchar(50) NOT NULL,
+ "order_id" varchar(500),
+ "token" varchar(500),
+ "merchant_order_id" varchar(255) NOT NULL,
+ "payload" jsonb,
+ CONSTRAINT "payment_info_merchant_order_id_unique" UNIQUE("merchant_order_id")
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."order_items" ALTER COLUMN "quantity" SET DATA TYPE varchar(50);--> statement-breakpoint
+ALTER TABLE "mf"."orders" ALTER COLUMN "slot_id" DROP NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."addresses" ADD COLUMN "name" varchar(255) NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."addresses" ADD COLUMN "phone" varchar(15) NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."addresses" ADD COLUMN "address_line1" varchar(255) NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."addresses" ADD COLUMN "address_line2" varchar(255);--> statement-breakpoint
+ALTER TABLE "mf"."addresses" ADD COLUMN "city" varchar(100) NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."addresses" ADD COLUMN "state" varchar(100) NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."addresses" ADD COLUMN "pincode" varchar(10) NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."addresses" ADD COLUMN "latitude" real;--> statement-breakpoint
+ALTER TABLE "mf"."addresses" ADD COLUMN "longitude" real;--> statement-breakpoint
+ALTER TABLE "mf"."orders" ADD COLUMN "is_cod" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."orders" ADD COLUMN "is_online_payment" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."orders" ADD COLUMN "payment_info_id" integer;--> statement-breakpoint
+ALTER TABLE "mf"."order_status" ADD CONSTRAINT "order_status_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."order_status" ADD CONSTRAINT "order_status_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."orders" ADD CONSTRAINT "orders_payment_info_id_payment_info_id_fk" FOREIGN KEY ("payment_info_id") REFERENCES "mf"."payment_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."addresses" DROP COLUMN "address";--> statement-breakpoint
+ALTER TABLE "mf"."order_items" DROP COLUMN "amount";--> statement-breakpoint
+ALTER TABLE "mf"."orders" DROP COLUMN "status";--> statement-breakpoint
+DROP TYPE "public"."order_status";
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0004_lively_diamondback.sql b/packages/db_helper_postgres/drizzle/0004_lively_diamondback.sql
new file mode 100644
index 0000000..aeaf5c3
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0004_lively_diamondback.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."order_status" ADD COLUMN "is_cancelled" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0005_tricky_warhawk.sql b/packages/db_helper_postgres/drizzle/0005_tricky_warhawk.sql
new file mode 100644
index 0000000..0ae296b
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0005_tricky_warhawk.sql
@@ -0,0 +1,13 @@
+CREATE TABLE "mf"."key_val_store" (
+ "key" varchar(255) PRIMARY KEY NOT NULL,
+ "value" jsonb
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."orders" ADD COLUMN "readable_id" integer NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."payments" ADD COLUMN "token" varchar(500);--> statement-breakpoint
+ALTER TABLE "mf"."payments" ADD COLUMN "merchant_order_id" varchar(255) NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."payments" ADD COLUMN "payload" jsonb;--> statement-breakpoint
+ALTER TABLE "mf"."payments" DROP COLUMN "gateway_order_id";--> statement-breakpoint
+ALTER TABLE "mf"."payments" DROP COLUMN "amount";--> statement-breakpoint
+ALTER TABLE "mf"."payments" DROP COLUMN "created_at";--> statement-breakpoint
+ALTER TABLE "mf"."payments" ADD CONSTRAINT "payments_merchant_order_id_unique" UNIQUE("merchant_order_id");
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0006_outstanding_joystick.sql b/packages/db_helper_postgres/drizzle/0006_outstanding_joystick.sql
new file mode 100644
index 0000000..9c764dc
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0006_outstanding_joystick.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "mf"."order_status" ADD COLUMN "cancel_reason" varchar(255);--> statement-breakpoint
+ALTER TABLE "mf"."order_status" ADD COLUMN "is_refund_done" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0007_yellow_charles_xavier.sql b/packages/db_helper_postgres/drizzle/0007_yellow_charles_xavier.sql
new file mode 100644
index 0000000..4847280
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0007_yellow_charles_xavier.sql
@@ -0,0 +1,11 @@
+CREATE TABLE "mf"."complaints" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."complaints_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "user_id" integer NOT NULL,
+ "order_id" integer,
+ "complaint_body" varchar(1000) NOT NULL,
+ "is_resolved" boolean DEFAULT false NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."complaints" ADD CONSTRAINT "complaints_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."complaints" ADD CONSTRAINT "complaints_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0008_nasty_mathemanic.sql b/packages/db_helper_postgres/drizzle/0008_nasty_mathemanic.sql
new file mode 100644
index 0000000..5bd2f03
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0008_nasty_mathemanic.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."product_info" ADD COLUMN "is_out_of_stock" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0009_peaceful_victor_mancha.sql b/packages/db_helper_postgres/drizzle/0009_peaceful_victor_mancha.sql
new file mode 100644
index 0000000..c0cb3f4
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0009_peaceful_victor_mancha.sql
@@ -0,0 +1,9 @@
+CREATE TABLE "mf"."staff_users" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."staff_users_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "name" varchar(255) NOT NULL,
+ "password" varchar(255) NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."user_creds" DROP CONSTRAINT "unique_user_cred";--> statement-breakpoint
+ALTER TABLE "mf"."addresses" ADD COLUMN "created_at" timestamp DEFAULT now() NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0010_flimsy_reavers.sql b/packages/db_helper_postgres/drizzle/0010_flimsy_reavers.sql
new file mode 100644
index 0000000..dcef34c
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0010_flimsy_reavers.sql
@@ -0,0 +1,15 @@
+CREATE TABLE "mf"."coupons" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."coupons_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "is_user_based" boolean DEFAULT false NOT NULL,
+ "discount_percent" numeric(5, 2),
+ "flat_discount" numeric(10, 2),
+ "min_order" numeric(10, 2),
+ "target_user" integer,
+ "created_by" integer NOT NULL,
+ "max_value" numeric(10, 2),
+ "is_invalidated" boolean DEFAULT false NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."coupons" ADD CONSTRAINT "coupons_target_user_users_id_fk" FOREIGN KEY ("target_user") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."coupons" ADD CONSTRAINT "coupons_created_by_staff_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "mf"."staff_users"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0011_watery_lady_mastermind.sql b/packages/db_helper_postgres/drizzle/0011_watery_lady_mastermind.sql
new file mode 100644
index 0000000..49f3b04
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0011_watery_lady_mastermind.sql
@@ -0,0 +1,3 @@
+ALTER TABLE "mf"."coupons" ADD COLUMN "is_apply_for_all" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."coupons" ADD COLUMN "valid_till" timestamp;--> statement-breakpoint
+ALTER TABLE "mf"."coupons" ADD COLUMN "max_limit_for_user" integer;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0012_flawless_jubilee.sql b/packages/db_helper_postgres/drizzle/0012_flawless_jubilee.sql
new file mode 100644
index 0000000..f4fb56d
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0012_flawless_jubilee.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "mf"."coupons" ADD COLUMN "coupon_code" varchar(50) NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."coupons" ADD CONSTRAINT "unique_coupon_code" UNIQUE("coupon_code");
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0013_married_celestials.sql b/packages/db_helper_postgres/drizzle/0013_married_celestials.sql
new file mode 100644
index 0000000..0844f4f
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0013_married_celestials.sql
@@ -0,0 +1,9 @@
+CREATE TABLE "mf"."coupon_usage" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."coupon_usage_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "user_id" integer NOT NULL,
+ "coupon_id" integer NOT NULL,
+ "used_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."coupon_usage" ADD CONSTRAINT "coupon_usage_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."coupon_usage" ADD CONSTRAINT "coupon_usage_coupon_id_coupons_id_fk" FOREIGN KEY ("coupon_id") REFERENCES "mf"."coupons"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0014_blushing_switch.sql b/packages/db_helper_postgres/drizzle/0014_blushing_switch.sql
new file mode 100644
index 0000000..390e55b
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0014_blushing_switch.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."delivery_slot_info" ADD COLUMN "delivery_sequence" jsonb;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0015_sloppy_boomerang.sql b/packages/db_helper_postgres/drizzle/0015_sloppy_boomerang.sql
new file mode 100644
index 0000000..5def26e
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0015_sloppy_boomerang.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."complaints" ADD COLUMN "response" varchar(1000);
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0016_eminent_thunderbolt_ross.sql b/packages/db_helper_postgres/drizzle/0016_eminent_thunderbolt_ross.sql
new file mode 100644
index 0000000..41056da
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0016_eminent_thunderbolt_ross.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "mf"."coupons" ADD COLUMN "product_id" integer;--> statement-breakpoint
+ALTER TABLE "mf"."coupons" ADD CONSTRAINT "coupons_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0017_steady_moira_mactaggert.sql b/packages/db_helper_postgres/drizzle/0017_steady_moira_mactaggert.sql
new file mode 100644
index 0000000..c4b644c
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0017_steady_moira_mactaggert.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "mf"."coupons" RENAME COLUMN "product_id" TO "product_ids";--> statement-breakpoint
+ALTER TABLE "mf"."coupons" DROP CONSTRAINT "coupons_product_id_product_info_id_fk";
diff --git a/packages/db_helper_postgres/drizzle/0018_simple_tomorrow_man.sql b/packages/db_helper_postgres/drizzle/0018_simple_tomorrow_man.sql
new file mode 100644
index 0000000..47e5e68
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0018_simple_tomorrow_man.sql
@@ -0,0 +1,13 @@
+CREATE TABLE "mf"."user_details" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."user_details_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "user_id" integer NOT NULL,
+ "bio" varchar(500),
+ "date_of_birth" date,
+ "gender" varchar(20),
+ "occupation" varchar(100),
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ "updated_at" timestamp DEFAULT now() NOT NULL,
+ CONSTRAINT "user_details_user_id_unique" UNIQUE("user_id")
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."user_details" ADD CONSTRAINT "user_details_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0019_productive_mulholland_black.sql b/packages/db_helper_postgres/drizzle/0019_productive_mulholland_black.sql
new file mode 100644
index 0000000..4b6b5ef
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0019_productive_mulholland_black.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."user_details" ADD COLUMN "profile_image" varchar(500);
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0020_narrow_charles_xavier.sql b/packages/db_helper_postgres/drizzle/0020_narrow_charles_xavier.sql
new file mode 100644
index 0000000..721e7bb
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0020_narrow_charles_xavier.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."product_info" ADD COLUMN "market_price" numeric(10, 2);
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0021_little_spot.sql b/packages/db_helper_postgres/drizzle/0021_little_spot.sql
new file mode 100644
index 0000000..7507a93
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0021_little_spot.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "mf"."orders" ADD COLUMN "cancellation_reviewed" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."orders" ADD COLUMN "admin_notes" text;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0022_flippant_omega_sentinel.sql b/packages/db_helper_postgres/drizzle/0022_flippant_omega_sentinel.sql
new file mode 100644
index 0000000..054c0fc
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0022_flippant_omega_sentinel.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."orders" ADD COLUMN "is_refund_done" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0023_sparkling_starjammers.sql b/packages/db_helper_postgres/drizzle/0023_sparkling_starjammers.sql
new file mode 100644
index 0000000..bdb19fb
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0023_sparkling_starjammers.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."orders" ADD COLUMN "user_notes" text;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0024_typical_the_twelve.sql b/packages/db_helper_postgres/drizzle/0024_typical_the_twelve.sql
new file mode 100644
index 0000000..b266835
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0024_typical_the_twelve.sql
@@ -0,0 +1,11 @@
+CREATE TABLE "mf"."vendor_snippets" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."vendor_snippets_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "snippet_code" varchar(255) NOT NULL,
+ "slot_id" integer NOT NULL,
+ "product_ids" integer[] NOT NULL,
+ "valid_till" timestamp,
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ CONSTRAINT "vendor_snippets_snippet_code_unique" UNIQUE("snippet_code")
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."vendor_snippets" ADD CONSTRAINT "vendor_snippets_slot_id_delivery_slot_info_id_fk" FOREIGN KEY ("slot_id") REFERENCES "mf"."delivery_slot_info"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0025_tricky_plazm.sql b/packages/db_helper_postgres/drizzle/0025_tricky_plazm.sql
new file mode 100644
index 0000000..1d6a3be
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0025_tricky_plazm.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."order_status" ADD COLUMN "is_payment_processed" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0026_flippant_spiral.sql b/packages/db_helper_postgres/drizzle/0026_flippant_spiral.sql
new file mode 100644
index 0000000..96c1557
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0026_flippant_spiral.sql
@@ -0,0 +1,2 @@
+CREATE TYPE "public"."payment_status" AS ENUM('pending', 'success', 'cod', 'failed');--> statement-breakpoint
+ALTER TABLE "mf"."order_status" RENAME COLUMN "is_payment_processed" TO "payment_status";
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0027_huge_iron_monger.sql b/packages/db_helper_postgres/drizzle/0027_huge_iron_monger.sql
new file mode 100644
index 0000000..12219b2
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0027_huge_iron_monger.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "mf"."order_status" ADD COLUMN "payment_state" "payment_status" DEFAULT 'pending' NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."order_status" DROP COLUMN "payment_status";
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0028_clever_anthem.sql b/packages/db_helper_postgres/drizzle/0028_clever_anthem.sql
new file mode 100644
index 0000000..b9824cf
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0028_clever_anthem.sql
@@ -0,0 +1,10 @@
+CREATE TABLE "mf"."notif_creds" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."notif_creds_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "token" varchar(500) NOT NULL,
+ "added_at" timestamp DEFAULT now() NOT NULL,
+ "user_id" integer NOT NULL,
+ "last_verified" timestamp,
+ CONSTRAINT "notif_creds_token_unique" UNIQUE("token")
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."notif_creds" ADD CONSTRAINT "notif_creds_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0029_short_king_cobra.sql b/packages/db_helper_postgres/drizzle/0029_short_king_cobra.sql
new file mode 100644
index 0000000..2c500d8
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0029_short_king_cobra.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."users" ALTER COLUMN "name" DROP NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0030_superb_exiles.sql b/packages/db_helper_postgres/drizzle/0030_superb_exiles.sql
new file mode 100644
index 0000000..8403b55
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0030_superb_exiles.sql
@@ -0,0 +1,11 @@
+CREATE TABLE "mf"."store_info" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."store_info_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "name" varchar(255) NOT NULL,
+ "description" varchar(500),
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ "owner" integer NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."product_info" ADD COLUMN "store_id" integer;--> statement-breakpoint
+ALTER TABLE "mf"."store_info" ADD CONSTRAINT "store_info_owner_staff_users_id_fk" FOREIGN KEY ("owner") REFERENCES "mf"."staff_users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."product_info" ADD CONSTRAINT "product_info_store_id_store_info_id_fk" FOREIGN KEY ("store_id") REFERENCES "mf"."store_info"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0031_clean_the_hunter.sql b/packages/db_helper_postgres/drizzle/0031_clean_the_hunter.sql
new file mode 100644
index 0000000..30a5cd3
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0031_clean_the_hunter.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."product_info" ALTER COLUMN "store_id" SET NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0032_tricky_baron_zemo.sql b/packages/db_helper_postgres/drizzle/0032_tricky_baron_zemo.sql
new file mode 100644
index 0000000..ea4b980
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0032_tricky_baron_zemo.sql
@@ -0,0 +1,22 @@
+CREATE TABLE "mf"."order_cancellations" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."order_cancellations_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "order_id" integer NOT NULL,
+ "user_id" integer NOT NULL,
+ "reason" varchar(500),
+ "cancellation_user_notes" text,
+ "cancellation_admin_notes" text,
+ "cancellation_reviewed" boolean DEFAULT false NOT NULL,
+ "refund_amount" numeric(10, 2),
+ "refund_status" varchar(50) DEFAULT 'none',
+ "razorpay_refund_id" varchar(255),
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ "reviewed_at" timestamp,
+ "refund_processed_at" timestamp,
+ CONSTRAINT "order_cancellations_order_id_unique" UNIQUE("order_id")
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."order_cancellations" ADD CONSTRAINT "order_cancellations_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."order_cancellations" ADD CONSTRAINT "order_cancellations_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."order_status" DROP COLUMN "is_refund_done";--> statement-breakpoint
+ALTER TABLE "mf"."orders" DROP COLUMN "cancellation_reviewed";--> statement-breakpoint
+ALTER TABLE "mf"."orders" DROP COLUMN "is_refund_done";
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0033_brainy_skullbuster.sql b/packages/db_helper_postgres/drizzle/0033_brainy_skullbuster.sql
new file mode 100644
index 0000000..1bf156e
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0033_brainy_skullbuster.sql
@@ -0,0 +1,20 @@
+CREATE TABLE "mf"."product_tag_info" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."product_tag_info_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "tag_name" varchar(100) NOT NULL,
+ "tag_description" varchar(500),
+ "image_url" varchar(500),
+ "is_dashboard_tag" boolean DEFAULT false NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ CONSTRAINT "product_tag_info_tag_name_unique" UNIQUE("tag_name")
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."product_tags" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."product_tags_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "product_id" integer NOT NULL,
+ "tag_id" integer NOT NULL,
+ "assigned_at" timestamp DEFAULT now() NOT NULL,
+ CONSTRAINT "unique_product_tag" UNIQUE("product_id","tag_id")
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."product_tags" ADD CONSTRAINT "product_tags_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."product_tags" ADD CONSTRAINT "product_tags_tag_id_product_tag_info_id_fk" FOREIGN KEY ("tag_id") REFERENCES "mf"."product_tag_info"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0034_yummy_riptide.sql b/packages/db_helper_postgres/drizzle/0034_yummy_riptide.sql
new file mode 100644
index 0000000..a9a87a8
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0034_yummy_riptide.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "mf"."coupon_usage" ADD COLUMN "order_id" integer;--> statement-breakpoint
+ALTER TABLE "mf"."coupon_usage" ADD CONSTRAINT "coupon_usage_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0035_lyrical_spencer_smythe.sql b/packages/db_helper_postgres/drizzle/0035_lyrical_spencer_smythe.sql
new file mode 100644
index 0000000..4b96344
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0035_lyrical_spencer_smythe.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."coupons" ADD COLUMN "exclusive_apply" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0036_eager_naoko.sql b/packages/db_helper_postgres/drizzle/0036_eager_naoko.sql
new file mode 100644
index 0000000..b3ef0e6
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0036_eager_naoko.sql
@@ -0,0 +1,21 @@
+CREATE TABLE "mf"."coupon_applicable_products" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."coupon_applicable_products_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "coupon_id" integer NOT NULL,
+ "product_id" integer NOT NULL,
+ CONSTRAINT "unique_coupon_product" UNIQUE("coupon_id","product_id")
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."coupon_applicable_users" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."coupon_applicable_users_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "coupon_id" integer NOT NULL,
+ "user_id" integer NOT NULL,
+ CONSTRAINT "unique_coupon_user" UNIQUE("coupon_id","user_id")
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."coupon_usage" ADD COLUMN "order_item_id" integer;--> statement-breakpoint
+ALTER TABLE "mf"."order_items" ADD COLUMN "discounted_price" numeric(10, 2);--> statement-breakpoint
+ALTER TABLE "mf"."coupon_applicable_products" ADD CONSTRAINT "coupon_applicable_products_coupon_id_coupons_id_fk" FOREIGN KEY ("coupon_id") REFERENCES "mf"."coupons"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."coupon_applicable_products" ADD CONSTRAINT "coupon_applicable_products_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."coupon_applicable_users" ADD CONSTRAINT "coupon_applicable_users_coupon_id_coupons_id_fk" FOREIGN KEY ("coupon_id") REFERENCES "mf"."coupons"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."coupon_applicable_users" ADD CONSTRAINT "coupon_applicable_users_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."coupon_usage" ADD CONSTRAINT "coupon_usage_order_item_id_order_items_id_fk" FOREIGN KEY ("order_item_id") REFERENCES "mf"."order_items"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0037_pale_outlaw_kid.sql b/packages/db_helper_postgres/drizzle/0037_pale_outlaw_kid.sql
new file mode 100644
index 0000000..3e20dca
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0037_pale_outlaw_kid.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."order_cancellations" RENAME COLUMN "razorpay_refund_id" TO "merchant_refund_id";
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0038_volatile_jean_grey.sql b/packages/db_helper_postgres/drizzle/0038_volatile_jean_grey.sql
new file mode 100644
index 0000000..7396d1f
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0038_volatile_jean_grey.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "mf"."product_info" ADD COLUMN "is_suspended" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."user_details" ADD COLUMN "is_suspended" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0039_last_silver_samurai.sql b/packages/db_helper_postgres/drizzle/0039_last_silver_samurai.sql
new file mode 100644
index 0000000..6a9292f
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0039_last_silver_samurai.sql
@@ -0,0 +1,15 @@
+CREATE TABLE "mf"."refunds" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."refunds_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "order_id" integer NOT NULL,
+ "refund_amount" numeric(10, 2),
+ "refund_status" varchar(50) DEFAULT 'none',
+ "merchant_refund_id" varchar(255),
+ "refund_processed_at" timestamp,
+ "created_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."order_status" ADD COLUMN "cancellation_user_notes" text;--> statement-breakpoint
+ALTER TABLE "mf"."order_status" ADD COLUMN "cancellation_admin_notes" text;--> statement-breakpoint
+ALTER TABLE "mf"."order_status" ADD COLUMN "cancellation_reviewed" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."order_status" ADD COLUMN "cancellation_reviewed_at" timestamp;--> statement-breakpoint
+ALTER TABLE "mf"."refunds" ADD CONSTRAINT "refunds_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0040_brief_albert_cleary.sql b/packages/db_helper_postgres/drizzle/0040_brief_albert_cleary.sql
new file mode 100644
index 0000000..3f24ba5
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0040_brief_albert_cleary.sql
@@ -0,0 +1 @@
+DROP TABLE "mf"."order_cancellations" CASCADE;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0041_fine_kronos.sql b/packages/db_helper_postgres/drizzle/0041_fine_kronos.sql
new file mode 100644
index 0000000..63e6b9c
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0041_fine_kronos.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "mf"."order_status" ADD COLUMN "refund_coupon_id" integer;--> statement-breakpoint
+ALTER TABLE "mf"."order_status" ADD CONSTRAINT "order_status_refund_coupon_id_coupons_id_fk" FOREIGN KEY ("refund_coupon_id") REFERENCES "mf"."coupons"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0042_organic_phil_sheldon.sql b/packages/db_helper_postgres/drizzle/0042_organic_phil_sheldon.sql
new file mode 100644
index 0000000..56b94be
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0042_organic_phil_sheldon.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."complaints" ADD COLUMN "images" jsonb;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0043_natural_joystick.sql b/packages/db_helper_postgres/drizzle/0043_natural_joystick.sql
new file mode 100644
index 0000000..cee8424
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0043_natural_joystick.sql
@@ -0,0 +1,23 @@
+CREATE TYPE "public"."upload_status" AS ENUM('pending', 'claimed');--> statement-breakpoint
+CREATE TABLE "mf"."product_reviews" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."product_reviews_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "user_id" integer NOT NULL,
+ "product_id" integer NOT NULL,
+ "review_body" text NOT NULL,
+ "image_urls" jsonb,
+ "review_time" timestamp DEFAULT now() NOT NULL,
+ "ratings" real NOT NULL,
+ "admin_response" text,
+ "admin_response_images" jsonb,
+ CONSTRAINT "rating_check" CHECK ("mf"."product_reviews"."ratings" >= 1 AND "mf"."product_reviews"."ratings" <= 5)
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."upload_url_status" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."upload_url_status_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ "key" varchar(500) NOT NULL,
+ "status" "upload_status" DEFAULT 'pending' NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."product_reviews" ADD CONSTRAINT "product_reviews_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."product_reviews" ADD CONSTRAINT "product_reviews_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0044_rapid_meltdown.sql b/packages/db_helper_postgres/drizzle/0044_rapid_meltdown.sql
new file mode 100644
index 0000000..d58638e
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0044_rapid_meltdown.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."store_info" ADD COLUMN "image_url" varchar(500);
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0045_puzzling_leader.sql b/packages/db_helper_postgres/drizzle/0045_puzzling_leader.sql
new file mode 100644
index 0000000..59cf3d2
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0045_puzzling_leader.sql
@@ -0,0 +1,16 @@
+CREATE TABLE "mf"."address_areas" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."address_areas_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "place_name" varchar(255) NOT NULL,
+ "zone_id" integer,
+ "created_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."address_zones" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."address_zones_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "zone_name" varchar(255) NOT NULL,
+ "added_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."addresses" ADD COLUMN "zone_id" integer;--> statement-breakpoint
+ALTER TABLE "mf"."address_areas" ADD CONSTRAINT "address_areas_zone_id_address_zones_id_fk" FOREIGN KEY ("zone_id") REFERENCES "mf"."address_zones"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."addresses" ADD CONSTRAINT "addresses_zone_id_address_zones_id_fk" FOREIGN KEY ("zone_id") REFERENCES "mf"."address_zones"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0046_old_aaron_stack.sql b/packages/db_helper_postgres/drizzle/0046_old_aaron_stack.sql
new file mode 100644
index 0000000..2341ca8
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0046_old_aaron_stack.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."orders" ADD COLUMN "delivery_charge" numeric(10, 2) DEFAULT '0' NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0047_dark_lester.sql b/packages/db_helper_postgres/drizzle/0047_dark_lester.sql
new file mode 100644
index 0000000..58181e0
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0047_dark_lester.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."product_info" ADD COLUMN "increment_step" real DEFAULT 1 NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0048_talented_stature.sql b/packages/db_helper_postgres/drizzle/0048_talented_stature.sql
new file mode 100644
index 0000000..f0fe03a
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0048_talented_stature.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."product_info" ALTER COLUMN "store_id" DROP NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0049_lowly_silverclaw.sql b/packages/db_helper_postgres/drizzle/0049_lowly_silverclaw.sql
new file mode 100644
index 0000000..202127f
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0049_lowly_silverclaw.sql
@@ -0,0 +1,16 @@
+CREATE TABLE "mf"."product_group_info" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."product_group_info_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "group_name" varchar(255) NOT NULL,
+ "description" varchar(500),
+ "created_at" timestamp DEFAULT now() NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."product_group_membership" (
+ "product_id" integer NOT NULL,
+ "group_id" integer NOT NULL,
+ "added_at" timestamp DEFAULT now() NOT NULL,
+ CONSTRAINT "product_group_membership_pk" UNIQUE("product_id","group_id")
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."product_group_membership" ADD CONSTRAINT "product_group_membership_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."product_group_membership" ADD CONSTRAINT "product_group_membership_group_id_product_group_info_id_fk" FOREIGN KEY ("group_id") REFERENCES "mf"."product_group_info"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0050_fantastic_leopardon.sql b/packages/db_helper_postgres/drizzle/0050_fantastic_leopardon.sql
new file mode 100644
index 0000000..37e1f71
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0050_fantastic_leopardon.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "mf"."order_items" ADD COLUMN "is_packaged" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."order_items" ADD COLUMN "is_package_verified" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0051_rapid_typhoid_mary.sql b/packages/db_helper_postgres/drizzle/0051_rapid_typhoid_mary.sql
new file mode 100644
index 0000000..c63f8c2
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0051_rapid_typhoid_mary.sql
@@ -0,0 +1,15 @@
+CREATE TABLE "mf"."home_banners" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."home_banners_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "name" varchar(255) NOT NULL,
+ "image_url" varchar(500) NOT NULL,
+ "description" varchar(500),
+ "product_id" integer,
+ "redirect_url" varchar(500),
+ "serial_num" integer NOT NULL,
+ "is_active" boolean DEFAULT false NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ "last_updated" timestamp DEFAULT now() NOT NULL,
+ CONSTRAINT "home_banners_serial_num_unique" UNIQUE("serial_num")
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."home_banners" ADD CONSTRAINT "home_banners_product_id_product_info_id_fk" FOREIGN KEY ("product_id") REFERENCES "mf"."product_info"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0052_pretty_captain_britain.sql b/packages/db_helper_postgres/drizzle/0052_pretty_captain_britain.sql
new file mode 100644
index 0000000..9cbaf8b
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0052_pretty_captain_britain.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."home_banners" ALTER COLUMN "serial_num" DROP NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0053_volatile_salo.sql b/packages/db_helper_postgres/drizzle/0053_volatile_salo.sql
new file mode 100644
index 0000000..5903c0a
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0053_volatile_salo.sql
@@ -0,0 +1,3 @@
+ALTER TABLE "mf"."home_banners" RENAME COLUMN "product_id" TO "product_ids";--> statement-breakpoint
+ALTER TABLE "mf"."home_banners" DROP CONSTRAINT "home_banners_serial_num_unique";--> statement-breakpoint
+ALTER TABLE "mf"."home_banners" DROP CONSTRAINT "home_banners_product_id_product_info_id_fk";
diff --git a/packages/db_helper_postgres/drizzle/0054_red_spyke.sql b/packages/db_helper_postgres/drizzle/0054_red_spyke.sql
new file mode 100644
index 0000000..50916eb
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0054_red_spyke.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."home_banners" DROP COLUMN "product_ids";
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0055_petite_fallen_one.sql b/packages/db_helper_postgres/drizzle/0055_petite_fallen_one.sql
new file mode 100644
index 0000000..0d33465
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0055_petite_fallen_one.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."home_banners" ADD COLUMN "product_ids" integer[];
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0056_fancy_satana.sql b/packages/db_helper_postgres/drizzle/0056_fancy_satana.sql
new file mode 100644
index 0000000..d4a7c46
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0056_fancy_satana.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."coupons" ADD COLUMN "applicable_users" jsonb;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0057_safe_earthquake.sql b/packages/db_helper_postgres/drizzle/0057_safe_earthquake.sql
new file mode 100644
index 0000000..2cc2635
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0057_safe_earthquake.sql
@@ -0,0 +1,3 @@
+ALTER TABLE "mf"."coupons" DROP CONSTRAINT "coupons_target_user_users_id_fk";
+--> statement-breakpoint
+ALTER TABLE "mf"."coupons" DROP COLUMN "target_user";
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0058_motionless_next_avengers.sql b/packages/db_helper_postgres/drizzle/0058_motionless_next_avengers.sql
new file mode 100644
index 0000000..97b49fd
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0058_motionless_next_avengers.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "mf"."orders" ADD COLUMN "order_group_id" varchar(255);--> statement-breakpoint
+ALTER TABLE "mf"."orders" ADD COLUMN "order_group_proportion" numeric(10, 4);
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0059_daily_spot.sql b/packages/db_helper_postgres/drizzle/0059_daily_spot.sql
new file mode 100644
index 0000000..a765b60
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0059_daily_spot.sql
@@ -0,0 +1,24 @@
+CREATE TABLE "mf"."reserved_coupons" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."reserved_coupons_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "secret_code" varchar(50) NOT NULL,
+ "coupon_code" varchar(50) NOT NULL,
+ "discount_percent" numeric(5, 2),
+ "flat_discount" numeric(10, 2),
+ "min_order" numeric(10, 2),
+ "product_ids" jsonb,
+ "max_value" numeric(10, 2),
+ "valid_till" timestamp,
+ "max_limit_for_user" integer,
+ "exclusive_apply" boolean DEFAULT false NOT NULL,
+ "is_redeemed" boolean DEFAULT false NOT NULL,
+ "redeemed_by" integer,
+ "redeemed_at" timestamp,
+ "created_by" integer NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ CONSTRAINT "reserved_coupons_secret_code_unique" UNIQUE("secret_code"),
+ CONSTRAINT "unique_secret_code" UNIQUE("secret_code")
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."reserved_coupons" ADD CONSTRAINT "reserved_coupons_redeemed_by_users_id_fk" FOREIGN KEY ("redeemed_by") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."reserved_coupons" ADD CONSTRAINT "reserved_coupons_created_by_staff_users_id_fk" FOREIGN KEY ("created_by") REFERENCES "mf"."staff_users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."coupons" DROP COLUMN "applicable_users";
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0060_numerous_terror.sql b/packages/db_helper_postgres/drizzle/0060_numerous_terror.sql
new file mode 100644
index 0000000..9ab3740
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0060_numerous_terror.sql
@@ -0,0 +1,28 @@
+CREATE TYPE "public"."staff_permission" AS ENUM('crud_product', 'make_coupon');--> statement-breakpoint
+CREATE TYPE "public"."staff_role" AS ENUM('admin', 'marketer', 'delivery_staff');--> statement-breakpoint
+CREATE TABLE "mf"."staff_permissions" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."staff_permissions_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "permission_name" "staff_permission" NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ CONSTRAINT "unique_permission_name" UNIQUE("permission_name")
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."staff_role_permissions" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."staff_role_permissions_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "staff_role_id" integer NOT NULL,
+ "staff_permission_id" integer NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ CONSTRAINT "unique_role_permission" UNIQUE("staff_role_id","staff_permission_id")
+);
+--> statement-breakpoint
+CREATE TABLE "mf"."staff_roles" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."staff_roles_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "role_name" "staff_role" NOT NULL,
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ CONSTRAINT "unique_role_name" UNIQUE("role_name")
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."staff_users" ADD COLUMN "staff_role_id" integer;--> statement-breakpoint
+ALTER TABLE "mf"."staff_role_permissions" ADD CONSTRAINT "staff_role_permissions_staff_role_id_staff_roles_id_fk" FOREIGN KEY ("staff_role_id") REFERENCES "mf"."staff_roles"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."staff_role_permissions" ADD CONSTRAINT "staff_role_permissions_staff_permission_id_staff_permissions_id_fk" FOREIGN KEY ("staff_permission_id") REFERENCES "mf"."staff_permissions"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."staff_users" ADD CONSTRAINT "staff_users_staff_role_id_staff_roles_id_fk" FOREIGN KEY ("staff_role_id") REFERENCES "mf"."staff_roles"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0061_calm_sir_ram.sql b/packages/db_helper_postgres/drizzle/0061_calm_sir_ram.sql
new file mode 100644
index 0000000..a7380ef
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0061_calm_sir_ram.sql
@@ -0,0 +1,2 @@
+ALTER TYPE "public"."staff_permission" ADD VALUE 'crud_staff_users';--> statement-breakpoint
+ALTER TYPE "public"."staff_role" ADD VALUE 'super_admin' BEFORE 'admin';
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0062_sloppy_sinister_six.sql b/packages/db_helper_postgres/drizzle/0062_sloppy_sinister_six.sql
new file mode 100644
index 0000000..7e24050
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0062_sloppy_sinister_six.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."coupons" ALTER COLUMN "created_by" DROP NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0063_friendly_mandarin.sql b/packages/db_helper_postgres/drizzle/0063_friendly_mandarin.sql
new file mode 100644
index 0000000..d4945a8
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0063_friendly_mandarin.sql
@@ -0,0 +1,3 @@
+ALTER TABLE "mf"."delivery_slot_info" ADD COLUMN "is_flash" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."product_info" ADD COLUMN "is_flash_available" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."product_info" ADD COLUMN "flash_price" numeric(10, 2);
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0064_milky_revanche.sql b/packages/db_helper_postgres/drizzle/0064_milky_revanche.sql
new file mode 100644
index 0000000..be63270
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0064_milky_revanche.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."orders" ADD COLUMN "is_flash_delivery" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0065_whole_spencer_smythe.sql b/packages/db_helper_postgres/drizzle/0065_whole_spencer_smythe.sql
new file mode 100644
index 0000000..4cf5c80
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0065_whole_spencer_smythe.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."product_info" ADD COLUMN "product_quantity" real DEFAULT 1 NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0066_gorgeous_karnak.sql b/packages/db_helper_postgres/drizzle/0066_gorgeous_karnak.sql
new file mode 100644
index 0000000..801b44f
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0066_gorgeous_karnak.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."order_status" ADD COLUMN "is_cancelled_by_admin" boolean;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0067_messy_earthquake.sql b/packages/db_helper_postgres/drizzle/0067_messy_earthquake.sql
new file mode 100644
index 0000000..c87f6aa
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0067_messy_earthquake.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "mf"."vendor_snippets" ALTER COLUMN "slot_id" DROP NOT NULL;--> statement-breakpoint
+ALTER TABLE "mf"."vendor_snippets" ADD COLUMN "is_permanent" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0068_colossal_magma.sql b/packages/db_helper_postgres/drizzle/0068_colossal_magma.sql
new file mode 100644
index 0000000..55fdba1
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0068_colossal_magma.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "mf"."addresses" ADD COLUMN "admin_latitude" real;--> statement-breakpoint
+ALTER TABLE "mf"."addresses" ADD COLUMN "admin_longitude" real;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0069_violet_smiling_tiger.sql b/packages/db_helper_postgres/drizzle/0069_violet_smiling_tiger.sql
new file mode 100644
index 0000000..ab0d54b
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0069_violet_smiling_tiger.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."addresses" ADD COLUMN "google_maps_url" varchar(500);
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0070_known_ares.sql b/packages/db_helper_postgres/drizzle/0070_known_ares.sql
new file mode 100644
index 0000000..77224eb
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0070_known_ares.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."delivery_slot_info" ADD COLUMN "group_ids" jsonb;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0071_moaning_shadow_king.sql b/packages/db_helper_postgres/drizzle/0071_moaning_shadow_king.sql
new file mode 100644
index 0000000..842a7b8
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0071_moaning_shadow_king.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."product_tag_info" ADD COLUMN "related_stores" jsonb;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0072_flowery_deathbird.sql b/packages/db_helper_postgres/drizzle/0072_flowery_deathbird.sql
new file mode 100644
index 0000000..79f3f4b
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0072_flowery_deathbird.sql
@@ -0,0 +1,7 @@
+CREATE TABLE "mf"."user_notifications" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."user_notifications_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "image_url" varchar(500),
+ "created_at" timestamp DEFAULT now() NOT NULL,
+ "body" text NOT NULL,
+ "applicable_users" jsonb
+);
diff --git a/packages/db_helper_postgres/drizzle/0073_faithful_gravity.sql b/packages/db_helper_postgres/drizzle/0073_faithful_gravity.sql
new file mode 100644
index 0000000..45d8247
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0073_faithful_gravity.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."user_notifications" ADD COLUMN "title" varchar(255) NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0074_outgoing_black_cat.sql b/packages/db_helper_postgres/drizzle/0074_outgoing_black_cat.sql
new file mode 100644
index 0000000..38a9e8b
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0074_outgoing_black_cat.sql
@@ -0,0 +1 @@
+ALTER TABLE "mf"."delivery_slot_info" ADD COLUMN "is_capacity_full" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/0075_cuddly_rocket_racer.sql b/packages/db_helper_postgres/drizzle/0075_cuddly_rocket_racer.sql
new file mode 100644
index 0000000..0748e2e
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0075_cuddly_rocket_racer.sql
@@ -0,0 +1,7 @@
+CREATE TABLE "mf"."unlogged_user_tokens" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."unlogged_user_tokens_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "token" varchar(500) NOT NULL,
+ "added_at" timestamp DEFAULT now() NOT NULL,
+ "last_verified" timestamp,
+ CONSTRAINT "unlogged_user_tokens_token_unique" UNIQUE("token")
+);
diff --git a/packages/db_helper_postgres/drizzle/0076_sturdy_wolverine.sql b/packages/db_helper_postgres/drizzle/0076_sturdy_wolverine.sql
new file mode 100644
index 0000000..18de64b
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/0076_sturdy_wolverine.sql
@@ -0,0 +1,13 @@
+CREATE TABLE "mf"."user_incidents" (
+ "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "mf"."user_incidents_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1),
+ "user_id" integer NOT NULL,
+ "order_id" integer,
+ "date_added" timestamp DEFAULT now() NOT NULL,
+ "admin_comment" text,
+ "added_by" integer,
+ "negativity_score" integer
+);
+--> statement-breakpoint
+ALTER TABLE "mf"."user_incidents" ADD CONSTRAINT "user_incidents_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "mf"."users"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."user_incidents" ADD CONSTRAINT "user_incidents_order_id_orders_id_fk" FOREIGN KEY ("order_id") REFERENCES "mf"."orders"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "mf"."user_incidents" ADD CONSTRAINT "user_incidents_added_by_staff_users_id_fk" FOREIGN KEY ("added_by") REFERENCES "mf"."staff_users"("id") ON DELETE no action ON UPDATE no action;
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0000_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0000_snapshot.json
new file mode 100644
index 0000000..272396a
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0000_snapshot.json
@@ -0,0 +1,976 @@
+{
+ "id": "fad820d3-856d-4d25-8a79-841c6c0a5eb5",
+ "prevId": "00000000-0000-0000-0000-000000000000",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "deliveryTime": {
+ "name": "deliveryTime",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freezeTime": {
+ "name": "freezeTime",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "amount": {
+ "name": "amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "order_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway_order_id": {
+ "name": "gateway_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "amount": {
+ "name": "amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.order_status": {
+ "name": "order_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "delivered",
+ "cancelled"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0001_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0001_snapshot.json
new file mode 100644
index 0000000..9daa79e
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0001_snapshot.json
@@ -0,0 +1,976 @@
+{
+ "id": "f702bb39-6b79-4352-979d-537ecbaafd02",
+ "prevId": "fad820d3-856d-4d25-8a79-841c6c0a5eb5",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "amount": {
+ "name": "amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "order_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway_order_id": {
+ "name": "gateway_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "amount": {
+ "name": "amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.order_status": {
+ "name": "order_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "delivered",
+ "cancelled"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0002_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0002_snapshot.json
new file mode 100644
index 0000000..0897a31
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0002_snapshot.json
@@ -0,0 +1,1048 @@
+{
+ "id": "c10e79e3-3bd3-46dc-8f6c-3b85f05e6119",
+ "prevId": "f702bb39-6b79-4352-979d-537ecbaafd02",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address": {
+ "name": "address",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "amount": {
+ "name": "amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "order_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway_order_id": {
+ "name": "gateway_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "amount": {
+ "name": "amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_cred": {
+ "name": "unique_user_cred",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.order_status": {
+ "name": "order_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "delivered",
+ "cancelled"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0003_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0003_snapshot.json
new file mode 100644
index 0000000..11a7c38
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0003_snapshot.json
@@ -0,0 +1,1272 @@
+{
+ "id": "ad09956c-2a68-4891-9a5e-8700ff8872f1",
+ "prevId": "c10e79e3-3bd3-46dc-8f6c-3b85f05e6119",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway_order_id": {
+ "name": "gateway_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "amount": {
+ "name": "amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_cred": {
+ "name": "unique_user_cred",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0004_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0004_snapshot.json
new file mode 100644
index 0000000..5c130b9
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0004_snapshot.json
@@ -0,0 +1,1279 @@
+{
+ "id": "fe3e10cd-df59-49d1-a87c-56cd0b2f9734",
+ "prevId": "ad09956c-2a68-4891-9a5e-8700ff8872f1",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway_order_id": {
+ "name": "gateway_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "amount": {
+ "name": "amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_cred": {
+ "name": "unique_user_cred",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0005_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0005_snapshot.json
new file mode 100644
index 0000000..79fd286
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0005_snapshot.json
@@ -0,0 +1,1317 @@
+{
+ "id": "ab751651-7276-48d1-9d5f-abdd1bf05947",
+ "prevId": "fe3e10cd-df59-49d1-a87c-56cd0b2f9734",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_cred": {
+ "name": "unique_user_cred",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0006_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0006_snapshot.json
new file mode 100644
index 0000000..2d7c1d0
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0006_snapshot.json
@@ -0,0 +1,1330 @@
+{
+ "id": "e16dde20-f38b-481d-a3ce-f14a266baef5",
+ "prevId": "ab751651-7276-48d1-9d5f-abdd1bf05947",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_cred": {
+ "name": "unique_user_cred",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0007_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0007_snapshot.json
new file mode 100644
index 0000000..90b1e24
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0007_snapshot.json
@@ -0,0 +1,1421 @@
+{
+ "id": "8e76cfb1-684c-4eef-849a-96300c6fa492",
+ "prevId": "e16dde20-f38b-481d-a3ce-f14a266baef5",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_cred": {
+ "name": "unique_user_cred",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0008_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0008_snapshot.json
new file mode 100644
index 0000000..3dcf5b6
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0008_snapshot.json
@@ -0,0 +1,1428 @@
+{
+ "id": "8391e6b3-8066-456c-9312-c18fa5103a38",
+ "prevId": "8e76cfb1-684c-4eef-849a-96300c6fa492",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_cred": {
+ "name": "unique_user_cred",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0009_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0009_snapshot.json
new file mode 100644
index 0000000..4310e8f
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0009_snapshot.json
@@ -0,0 +1,1476 @@
+{
+ "id": "bc817f61-cf55-4711-80fe-c1487d764d4f",
+ "prevId": "8391e6b3-8066-456c-9312-c18fa5103a38",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0010_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0010_snapshot.json
new file mode 100644
index 0000000..e20c3ba
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0010_snapshot.json
@@ -0,0 +1,1592 @@
+{
+ "id": "85a7d7e5-d586-4a0b-a4a5-3d71cca6768a",
+ "prevId": "bc817f61-cf55-4711-80fe-c1487d764d4f",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0011_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0011_snapshot.json
new file mode 100644
index 0000000..12de0b2
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0011_snapshot.json
@@ -0,0 +1,1611 @@
+{
+ "id": "79d54b35-e076-4351-963e-e2a0b83d77be",
+ "prevId": "85a7d7e5-d586-4a0b-a4a5-3d71cca6768a",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0012_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0012_snapshot.json
new file mode 100644
index 0000000..abce803
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0012_snapshot.json
@@ -0,0 +1,1625 @@
+{
+ "id": "206aba7c-b2d4-4cdc-9019-950ddeb1bcd5",
+ "prevId": "79d54b35-e076-4351-963e-e2a0b83d77be",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0013_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0013_snapshot.json
new file mode 100644
index 0000000..bfbe62f
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0013_snapshot.json
@@ -0,0 +1,1703 @@
+{
+ "id": "05c591ea-9654-4079-9d4e-44b78e4115e6",
+ "prevId": "206aba7c-b2d4-4cdc-9019-950ddeb1bcd5",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0014_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0014_snapshot.json
new file mode 100644
index 0000000..04c1239
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0014_snapshot.json
@@ -0,0 +1,1709 @@
+{
+ "id": "59dd96ee-8bed-44a2-82ec-e4a87b6caae8",
+ "prevId": "05c591ea-9654-4079-9d4e-44b78e4115e6",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0015_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0015_snapshot.json
new file mode 100644
index 0000000..170c4ee
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0015_snapshot.json
@@ -0,0 +1,1715 @@
+{
+ "id": "1cf1a931-ca28-490e-9c25-532b858ac97c",
+ "prevId": "59dd96ee-8bed-44a2-82ec-e4a87b6caae8",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0016_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0016_snapshot.json
new file mode 100644
index 0000000..6a4e997
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0016_snapshot.json
@@ -0,0 +1,1735 @@
+{
+ "id": "fd9624a0-46e0-402e-b89c-b4cbc612a01a",
+ "prevId": "1cf1a931-ca28-490e-9c25-532b858ac97c",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_product_id_product_info_id_fk": {
+ "name": "coupons_product_id_product_info_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0017_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0017_snapshot.json
new file mode 100644
index 0000000..b82026d
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0017_snapshot.json
@@ -0,0 +1,1721 @@
+{
+ "id": "439b48c6-32f6-46c1-8320-7276c17a3692",
+ "prevId": "fd9624a0-46e0-402e-b89c-b4cbc612a01a",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0018_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0018_snapshot.json
new file mode 100644
index 0000000..9111837
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0018_snapshot.json
@@ -0,0 +1,1818 @@
+{
+ "id": "954545a7-4846-4e3e-8711-3acefdd93417",
+ "prevId": "439b48c6-32f6-46c1-8320-7276c17a3692",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0019_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0019_snapshot.json
new file mode 100644
index 0000000..59fa671
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0019_snapshot.json
@@ -0,0 +1,1824 @@
+{
+ "id": "2325ff4f-4880-47ec-a396-ce8acdd09850",
+ "prevId": "954545a7-4846-4e3e-8711-3acefdd93417",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0020_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0020_snapshot.json
new file mode 100644
index 0000000..c5aea28
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0020_snapshot.json
@@ -0,0 +1,1830 @@
+{
+ "id": "691946b7-158f-4f9e-addb-a8be5cb41597",
+ "prevId": "2325ff4f-4880-47ec-a396-ce8acdd09850",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0021_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0021_snapshot.json
new file mode 100644
index 0000000..95a86ec
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0021_snapshot.json
@@ -0,0 +1,1843 @@
+{
+ "id": "d9b7ac5b-af0d-4aac-a352-887cfeed5a2f",
+ "prevId": "691946b7-158f-4f9e-addb-a8be5cb41597",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0022_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0022_snapshot.json
new file mode 100644
index 0000000..dd9b619
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0022_snapshot.json
@@ -0,0 +1,1850 @@
+{
+ "id": "115942e4-9714-4df3-a48b-23211f65cb6b",
+ "prevId": "d9b7ac5b-af0d-4aac-a352-887cfeed5a2f",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0023_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0023_snapshot.json
new file mode 100644
index 0000000..f8056fe
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0023_snapshot.json
@@ -0,0 +1,1856 @@
+{
+ "id": "cf922142-eeff-4a81-b99d-a5bd5a2464e5",
+ "prevId": "115942e4-9714-4df3-a48b-23211f65cb6b",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0024_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0024_snapshot.json
new file mode 100644
index 0000000..779931f
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0024_snapshot.json
@@ -0,0 +1,1940 @@
+{
+ "id": "f902f415-826a-4332-b64a-b01e05e4c566",
+ "prevId": "cf922142-eeff-4a81-b99d-a5bd5a2464e5",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0025_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0025_snapshot.json
new file mode 100644
index 0000000..54583d5
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0025_snapshot.json
@@ -0,0 +1,1947 @@
+{
+ "id": "d54aef8a-8ce7-4164-8615-3b819d644700",
+ "prevId": "f902f415-826a-4332-b64a-b01e05e4c566",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_payment_processed": {
+ "name": "is_payment_processed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0026_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0026_snapshot.json
new file mode 100644
index 0000000..b9b15b9
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0026_snapshot.json
@@ -0,0 +1,1959 @@
+{
+ "id": "4301f24d-4472-44fa-bff8-c12f162531c7",
+ "prevId": "d54aef8a-8ce7-4164-8615-3b819d644700",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_status": {
+ "name": "payment_status",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0027_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0027_snapshot.json
new file mode 100644
index 0000000..e543464
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0027_snapshot.json
@@ -0,0 +1,1959 @@
+{
+ "id": "20dc84e5-7223-4852-8239-f9f1f567b535",
+ "prevId": "4301f24d-4472-44fa-bff8-c12f162531c7",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0028_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0028_snapshot.json
new file mode 100644
index 0000000..9a93c8a
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0028_snapshot.json
@@ -0,0 +1,2037 @@
+{
+ "id": "0c377907-554d-41d9-ad3c-0add9c5edcd7",
+ "prevId": "20dc84e5-7223-4852-8239-f9f1f567b535",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0029_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0029_snapshot.json
new file mode 100644
index 0000000..7c51a75
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0029_snapshot.json
@@ -0,0 +1,2037 @@
+{
+ "id": "a2910b44-5bd0-4f5f-ae7e-2b81c0aa8610",
+ "prevId": "0c377907-554d-41d9-ad3c-0add9c5edcd7",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0030_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0030_snapshot.json
new file mode 100644
index 0000000..364b7ef
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0030_snapshot.json
@@ -0,0 +1,2127 @@
+{
+ "id": "1d2b26d7-2a89-446e-93ce-16d068986e09",
+ "prevId": "a2910b44-5bd0-4f5f-ae7e-2b81c0aa8610",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0031_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0031_snapshot.json
new file mode 100644
index 0000000..2e1c678
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0031_snapshot.json
@@ -0,0 +1,2127 @@
+{
+ "id": "c74c19b3-5a26-4180-84a5-0af70c776ea6",
+ "prevId": "1d2b26d7-2a89-446e-93ce-16d068986e09",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_refund_done": {
+ "name": "is_refund_done",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0032_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0032_snapshot.json
new file mode 100644
index 0000000..5cda79b
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0032_snapshot.json
@@ -0,0 +1,2248 @@
+{
+ "id": "efcf7b28-c4d0-4f1a-bcdb-aae980775fd3",
+ "prevId": "c74c19b3-5a26-4180-84a5-0af70c776ea6",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_cancellations": {
+ "name": "order_cancellations",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_cancellations_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reason": {
+ "name": "reason",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "razorpay_refund_id": {
+ "name": "razorpay_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_cancellations_order_id_orders_id_fk": {
+ "name": "order_cancellations_order_id_orders_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_cancellations_user_id_users_id_fk": {
+ "name": "order_cancellations_user_id_users_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "order_cancellations_order_id_unique": {
+ "name": "order_cancellations_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0033_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0033_snapshot.json
new file mode 100644
index 0000000..7f9730b
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0033_snapshot.json
@@ -0,0 +1,2405 @@
+{
+ "id": "c8c49b84-48e5-47d8-9db3-3346180df341",
+ "prevId": "efcf7b28-c4d0-4f1a-bcdb-aae980775fd3",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_cancellations": {
+ "name": "order_cancellations",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_cancellations_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reason": {
+ "name": "reason",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "razorpay_refund_id": {
+ "name": "razorpay_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_cancellations_order_id_orders_id_fk": {
+ "name": "order_cancellations_order_id_orders_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_cancellations_user_id_users_id_fk": {
+ "name": "order_cancellations_user_id_users_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "order_cancellations_order_id_unique": {
+ "name": "order_cancellations_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0034_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0034_snapshot.json
new file mode 100644
index 0000000..9dc5b50
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0034_snapshot.json
@@ -0,0 +1,2425 @@
+{
+ "id": "a1bc796c-fb93-453e-acc0-95efe2264b2a",
+ "prevId": "c8c49b84-48e5-47d8-9db3-3346180df341",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_cancellations": {
+ "name": "order_cancellations",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_cancellations_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reason": {
+ "name": "reason",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "razorpay_refund_id": {
+ "name": "razorpay_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_cancellations_order_id_orders_id_fk": {
+ "name": "order_cancellations_order_id_orders_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_cancellations_user_id_users_id_fk": {
+ "name": "order_cancellations_user_id_users_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "order_cancellations_order_id_unique": {
+ "name": "order_cancellations_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0035_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0035_snapshot.json
new file mode 100644
index 0000000..1ed4401
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0035_snapshot.json
@@ -0,0 +1,2432 @@
+{
+ "id": "a1aafd4d-ca42-4635-bd1b-1d0c1d6171cd",
+ "prevId": "a1bc796c-fb93-453e-acc0-95efe2264b2a",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_cancellations": {
+ "name": "order_cancellations",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_cancellations_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reason": {
+ "name": "reason",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "razorpay_refund_id": {
+ "name": "razorpay_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_cancellations_order_id_orders_id_fk": {
+ "name": "order_cancellations_order_id_orders_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_cancellations_user_id_users_id_fk": {
+ "name": "order_cancellations_user_id_users_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "order_cancellations_order_id_unique": {
+ "name": "order_cancellations_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0036_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0036_snapshot.json
new file mode 100644
index 0000000..4061f92
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0036_snapshot.json
@@ -0,0 +1,2618 @@
+{
+ "id": "91401115-16a6-41ed-b308-cd7fa2a4301f",
+ "prevId": "a1aafd4d-ca42-4635-bd1b-1d0c1d6171cd",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_cancellations": {
+ "name": "order_cancellations",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_cancellations_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reason": {
+ "name": "reason",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "razorpay_refund_id": {
+ "name": "razorpay_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_cancellations_order_id_orders_id_fk": {
+ "name": "order_cancellations_order_id_orders_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_cancellations_user_id_users_id_fk": {
+ "name": "order_cancellations_user_id_users_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "order_cancellations_order_id_unique": {
+ "name": "order_cancellations_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0037_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0037_snapshot.json
new file mode 100644
index 0000000..330fefe
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0037_snapshot.json
@@ -0,0 +1,2618 @@
+{
+ "id": "4cb82e78-6b8b-434b-8d73-824c457c8590",
+ "prevId": "91401115-16a6-41ed-b308-cd7fa2a4301f",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_cancellations": {
+ "name": "order_cancellations",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_cancellations_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reason": {
+ "name": "reason",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_cancellations_order_id_orders_id_fk": {
+ "name": "order_cancellations_order_id_orders_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_cancellations_user_id_users_id_fk": {
+ "name": "order_cancellations_user_id_users_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "order_cancellations_order_id_unique": {
+ "name": "order_cancellations_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0038_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0038_snapshot.json
new file mode 100644
index 0000000..1552918
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0038_snapshot.json
@@ -0,0 +1,2632 @@
+{
+ "id": "4c5e229e-3a5e-4900-8d76-80a0f560a7fc",
+ "prevId": "4cb82e78-6b8b-434b-8d73-824c457c8590",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_cancellations": {
+ "name": "order_cancellations",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_cancellations_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reason": {
+ "name": "reason",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_cancellations_order_id_orders_id_fk": {
+ "name": "order_cancellations_order_id_orders_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_cancellations_user_id_users_id_fk": {
+ "name": "order_cancellations_user_id_users_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "order_cancellations_order_id_unique": {
+ "name": "order_cancellations_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0039_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0039_snapshot.json
new file mode 100644
index 0000000..2c22a2e
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0039_snapshot.json
@@ -0,0 +1,2740 @@
+{
+ "id": "09444a3a-5b4c-4963-9e47-dabe794c7824",
+ "prevId": "4c5e229e-3a5e-4900-8d76-80a0f560a7fc",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_cancellations": {
+ "name": "order_cancellations",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_cancellations_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "reason": {
+ "name": "reason",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "reviewed_at": {
+ "name": "reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_cancellations_order_id_orders_id_fk": {
+ "name": "order_cancellations_order_id_orders_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_cancellations_user_id_users_id_fk": {
+ "name": "order_cancellations_user_id_users_id_fk",
+ "tableFrom": "order_cancellations",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "order_cancellations_order_id_unique": {
+ "name": "order_cancellations_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0040_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0040_snapshot.json
new file mode 100644
index 0000000..5d1b499
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0040_snapshot.json
@@ -0,0 +1,2598 @@
+{
+ "id": "4e01fc72-d510-4213-bf24-6fa49b0bef22",
+ "prevId": "09444a3a-5b4c-4963-9e47-dabe794c7824",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0041_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0041_snapshot.json
new file mode 100644
index 0000000..2473612
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0041_snapshot.json
@@ -0,0 +1,2618 @@
+{
+ "id": "c86db5c8-3679-4f55-b04e-accd3e06c122",
+ "prevId": "4e01fc72-d510-4213-bf24-6fa49b0bef22",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0042_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0042_snapshot.json
new file mode 100644
index 0000000..d507d90
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0042_snapshot.json
@@ -0,0 +1,2624 @@
+{
+ "id": "8f58d3bd-8388-4b61-a005-988a8b738efa",
+ "prevId": "c86db5c8-3679-4f55-b04e-accd3e06c122",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0043_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0043_snapshot.json
new file mode 100644
index 0000000..76061d8
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0043_snapshot.json
@@ -0,0 +1,2796 @@
+{
+ "id": "5831be0c-4e34-497c-8cd4-498f6a694cb4",
+ "prevId": "8f58d3bd-8388-4b61-a005-988a8b738efa",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0044_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0044_snapshot.json
new file mode 100644
index 0000000..d454b81
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0044_snapshot.json
@@ -0,0 +1,2802 @@
+{
+ "id": "e1e88d4a-26a4-41bc-9ceb-7b3f53aec59e",
+ "prevId": "5831be0c-4e34-497c-8cd4-498f6a694cb4",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0045_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0045_snapshot.json
new file mode 100644
index 0000000..67f6827
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0045_snapshot.json
@@ -0,0 +1,2929 @@
+{
+ "id": "ec3bf6b5-a0c1-458f-bf8c-5abb19a1e0c0",
+ "prevId": "e1e88d4a-26a4-41bc-9ceb-7b3f53aec59e",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0046_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0046_snapshot.json
new file mode 100644
index 0000000..8fb3db1
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0046_snapshot.json
@@ -0,0 +1,2936 @@
+{
+ "id": "49d740b1-1a3e-4f7a-889f-de0b21ee6cc8",
+ "prevId": "ec3bf6b5-a0c1-458f-bf8c-5abb19a1e0c0",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0047_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0047_snapshot.json
new file mode 100644
index 0000000..071ae13
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0047_snapshot.json
@@ -0,0 +1,2943 @@
+{
+ "id": "6fa28025-ef21-438b-987f-78a0e50142e5",
+ "prevId": "49d740b1-1a3e-4f7a-889f-de0b21ee6cc8",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0048_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0048_snapshot.json
new file mode 100644
index 0000000..cdff944
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0048_snapshot.json
@@ -0,0 +1,2943 @@
+{
+ "id": "212a5b02-47e1-4336-8993-5ca2c762d339",
+ "prevId": "6fa28025-ef21-438b-987f-78a0e50142e5",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0049_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0049_snapshot.json
new file mode 100644
index 0000000..20199c7
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0049_snapshot.json
@@ -0,0 +1,3062 @@
+{
+ "id": "37e3e95d-e108-4a4c-8589-af8c3b3f8e72",
+ "prevId": "212a5b02-47e1-4336-8993-5ca2c762d339",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0050_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0050_snapshot.json
new file mode 100644
index 0000000..f2854c0
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0050_snapshot.json
@@ -0,0 +1,3076 @@
+{
+ "id": "8d23ff8c-67de-466f-80a5-1637c4e19ac6",
+ "prevId": "37e3e95d-e108-4a4c-8589-af8c3b3f8e72",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0051_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0051_snapshot.json
new file mode 100644
index 0000000..e48c75b
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0051_snapshot.json
@@ -0,0 +1,3186 @@
+{
+ "id": "08aad159-d8ec-449a-b2d2-bc9f798f236e",
+ "prevId": "8d23ff8c-67de-466f-80a5-1637c4e19ac6",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "home_banners_product_id_product_info_id_fk": {
+ "name": "home_banners_product_id_product_info_id_fk",
+ "tableFrom": "home_banners",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "home_banners_serial_num_unique": {
+ "name": "home_banners_serial_num_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "serial_num"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0052_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0052_snapshot.json
new file mode 100644
index 0000000..93cf2a7
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0052_snapshot.json
@@ -0,0 +1,3186 @@
+{
+ "id": "d7557b6f-c95b-4cf5-bc58-b74e319f1ba3",
+ "prevId": "08aad159-d8ec-449a-b2d2-bc9f798f236e",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "home_banners_product_id_product_info_id_fk": {
+ "name": "home_banners_product_id_product_info_id_fk",
+ "tableFrom": "home_banners",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "home_banners_serial_num_unique": {
+ "name": "home_banners_serial_num_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "serial_num"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0053_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0053_snapshot.json
new file mode 100644
index 0000000..d86c845
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0053_snapshot.json
@@ -0,0 +1,3163 @@
+{
+ "id": "5c480a1c-046b-46d4-a228-3953a5ef628e",
+ "prevId": "d7557b6f-c95b-4cf5-bc58-b74e319f1ba3",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0054_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0054_snapshot.json
new file mode 100644
index 0000000..5e5fce3
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0054_snapshot.json
@@ -0,0 +1,3157 @@
+{
+ "id": "9fa36e99-9716-4ab3-a0d1-89e8ad7d7869",
+ "prevId": "5c480a1c-046b-46d4-a228-3953a5ef628e",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0055_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0055_snapshot.json
new file mode 100644
index 0000000..92fa7cd
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0055_snapshot.json
@@ -0,0 +1,3163 @@
+{
+ "id": "eccbd1d7-e39e-46dd-8740-bd33822d474c",
+ "prevId": "9fa36e99-9716-4ab3-a0d1-89e8ad7d7869",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0056_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0056_snapshot.json
new file mode 100644
index 0000000..671492d
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0056_snapshot.json
@@ -0,0 +1,3169 @@
+{
+ "id": "ad069c95-33d2-4658-aba0-26296197f466",
+ "prevId": "eccbd1d7-e39e-46dd-8740-bd33822d474c",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "target_user": {
+ "name": "target_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicable_users": {
+ "name": "applicable_users",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_target_user_users_id_fk": {
+ "name": "coupons_target_user_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "target_user"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0057_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0057_snapshot.json
new file mode 100644
index 0000000..1597d96
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0057_snapshot.json
@@ -0,0 +1,3149 @@
+{
+ "id": "13c13452-4cb3-44a1-8146-1eef954ab69f",
+ "prevId": "ad069c95-33d2-4658-aba0-26296197f466",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicable_users": {
+ "name": "applicable_users",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0058_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0058_snapshot.json
new file mode 100644
index 0000000..c2f4153
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0058_snapshot.json
@@ -0,0 +1,3161 @@
+{
+ "id": "eeb3ef97-16ed-4f66-91f1-2ac66fa1abb7",
+ "prevId": "13c13452-4cb3-44a1-8146-1eef954ab69f",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "applicable_users": {
+ "name": "applicable_users",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0059_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0059_snapshot.json
new file mode 100644
index 0000000..82b7445
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0059_snapshot.json
@@ -0,0 +1,3322 @@
+{
+ "id": "463513fe-d8c7-4357-a5d9-15a9c46a2346",
+ "prevId": "eeb3ef97-16ed-4f66-91f1-2ac66fa1abb7",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0060_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0060_snapshot.json
new file mode 100644
index 0000000..bf00379
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0060_snapshot.json
@@ -0,0 +1,3551 @@
+{
+ "id": "270fae24-9b4f-4b74-ba93-89def9ca7a25",
+ "prevId": "463513fe-d8c7-4357-a5d9-15a9c46a2346",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0061_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0061_snapshot.json
new file mode 100644
index 0000000..a4d9566
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0061_snapshot.json
@@ -0,0 +1,3553 @@
+{
+ "id": "eeb83ecd-6c96-46c9-8ddc-d9e406182c75",
+ "prevId": "270fae24-9b4f-4b74-ba93-89def9ca7a25",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0062_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0062_snapshot.json
new file mode 100644
index 0000000..cbfb1bf
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0062_snapshot.json
@@ -0,0 +1,3553 @@
+{
+ "id": "d7ef9e64-f6c0-4817-94ad-32c6b3cb31ce",
+ "prevId": "eeb83ecd-6c96-46c9-8ddc-d9e406182c75",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0063_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0063_snapshot.json
new file mode 100644
index 0000000..c901b9e
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0063_snapshot.json
@@ -0,0 +1,3573 @@
+{
+ "id": "f5076fcd-12d5-44ba-a1a7-85d431285ab5",
+ "prevId": "d7ef9e64-f6c0-4817-94ad-32c6b3cb31ce",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_flash": {
+ "name": "is_flash",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_flash_available": {
+ "name": "is_flash_available",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "flash_price": {
+ "name": "flash_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0064_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0064_snapshot.json
new file mode 100644
index 0000000..6a3d2c8
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0064_snapshot.json
@@ -0,0 +1,3580 @@
+{
+ "id": "37e45f91-69d0-4b4e-b679-b03ed83c2fd7",
+ "prevId": "f5076fcd-12d5-44ba-a1a7-85d431285ab5",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_flash": {
+ "name": "is_flash",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_flash_delivery": {
+ "name": "is_flash_delivery",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_flash_available": {
+ "name": "is_flash_available",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "flash_price": {
+ "name": "flash_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0065_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0065_snapshot.json
new file mode 100644
index 0000000..b03b2c2
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0065_snapshot.json
@@ -0,0 +1,3587 @@
+{
+ "id": "ef1b71bc-2303-4273-8941-56ec011575fd",
+ "prevId": "37e45f91-69d0-4b4e-b679-b03ed83c2fd7",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_flash": {
+ "name": "is_flash",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_flash_delivery": {
+ "name": "is_flash_delivery",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_flash_available": {
+ "name": "is_flash_available",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "flash_price": {
+ "name": "flash_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "product_quantity": {
+ "name": "product_quantity",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0066_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0066_snapshot.json
new file mode 100644
index 0000000..468009c
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0066_snapshot.json
@@ -0,0 +1,3593 @@
+{
+ "id": "f105c79e-a657-457d-a49a-314b998b4ed3",
+ "prevId": "ef1b71bc-2303-4273-8941-56ec011575fd",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_flash": {
+ "name": "is_flash",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cancelled_by_admin": {
+ "name": "is_cancelled_by_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_flash_delivery": {
+ "name": "is_flash_delivery",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_flash_available": {
+ "name": "is_flash_available",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "flash_price": {
+ "name": "flash_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "product_quantity": {
+ "name": "product_quantity",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0067_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0067_snapshot.json
new file mode 100644
index 0000000..9001f9d
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0067_snapshot.json
@@ -0,0 +1,3600 @@
+{
+ "id": "5da5eca2-307f-4098-a9c7-9fcaaac5c3e2",
+ "prevId": "f105c79e-a657-457d-a49a-314b998b4ed3",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_flash": {
+ "name": "is_flash",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cancelled_by_admin": {
+ "name": "is_cancelled_by_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_flash_delivery": {
+ "name": "is_flash_delivery",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_flash_available": {
+ "name": "is_flash_available",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "flash_price": {
+ "name": "flash_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "product_quantity": {
+ "name": "product_quantity",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_permanent": {
+ "name": "is_permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0068_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0068_snapshot.json
new file mode 100644
index 0000000..5d27ef0
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0068_snapshot.json
@@ -0,0 +1,3612 @@
+{
+ "id": "9e107cf4-10af-409c-b465-73740ca869e1",
+ "prevId": "5da5eca2-307f-4098-a9c7-9fcaaac5c3e2",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_latitude": {
+ "name": "admin_latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_longitude": {
+ "name": "admin_longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_flash": {
+ "name": "is_flash",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cancelled_by_admin": {
+ "name": "is_cancelled_by_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_flash_delivery": {
+ "name": "is_flash_delivery",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_flash_available": {
+ "name": "is_flash_available",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "flash_price": {
+ "name": "flash_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "product_quantity": {
+ "name": "product_quantity",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_permanent": {
+ "name": "is_permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0069_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0069_snapshot.json
new file mode 100644
index 0000000..efdb65c
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0069_snapshot.json
@@ -0,0 +1,3618 @@
+{
+ "id": "63877efe-271a-44e7-a95f-83421f37376d",
+ "prevId": "9e107cf4-10af-409c-b465-73740ca869e1",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "google_maps_url": {
+ "name": "google_maps_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_latitude": {
+ "name": "admin_latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_longitude": {
+ "name": "admin_longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_flash": {
+ "name": "is_flash",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cancelled_by_admin": {
+ "name": "is_cancelled_by_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_flash_delivery": {
+ "name": "is_flash_delivery",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_flash_available": {
+ "name": "is_flash_available",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "flash_price": {
+ "name": "flash_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "product_quantity": {
+ "name": "product_quantity",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_permanent": {
+ "name": "is_permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0070_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0070_snapshot.json
new file mode 100644
index 0000000..23df017
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0070_snapshot.json
@@ -0,0 +1,3624 @@
+{
+ "id": "7c9cf543-7cef-43e5-801d-8b24eaf66e84",
+ "prevId": "63877efe-271a-44e7-a95f-83421f37376d",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "google_maps_url": {
+ "name": "google_maps_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_latitude": {
+ "name": "admin_latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_longitude": {
+ "name": "admin_longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_flash": {
+ "name": "is_flash",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_ids": {
+ "name": "group_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cancelled_by_admin": {
+ "name": "is_cancelled_by_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_flash_delivery": {
+ "name": "is_flash_delivery",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_flash_available": {
+ "name": "is_flash_available",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "flash_price": {
+ "name": "flash_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "product_quantity": {
+ "name": "product_quantity",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_permanent": {
+ "name": "is_permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0071_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0071_snapshot.json
new file mode 100644
index 0000000..0194fa6
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0071_snapshot.json
@@ -0,0 +1,3630 @@
+{
+ "id": "959eafae-508f-41d7-8086-b195fce9bcec",
+ "prevId": "7c9cf543-7cef-43e5-801d-8b24eaf66e84",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "google_maps_url": {
+ "name": "google_maps_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_latitude": {
+ "name": "admin_latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_longitude": {
+ "name": "admin_longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_flash": {
+ "name": "is_flash",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_ids": {
+ "name": "group_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cancelled_by_admin": {
+ "name": "is_cancelled_by_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_flash_delivery": {
+ "name": "is_flash_delivery",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_flash_available": {
+ "name": "is_flash_available",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "flash_price": {
+ "name": "flash_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "product_quantity": {
+ "name": "product_quantity",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "related_stores": {
+ "name": "related_stores",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_permanent": {
+ "name": "is_permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0072_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0072_snapshot.json
new file mode 100644
index 0000000..57403bb
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0072_snapshot.json
@@ -0,0 +1,3685 @@
+{
+ "id": "66373351-55c5-4990-bb31-8dd9bf22016c",
+ "prevId": "959eafae-508f-41d7-8086-b195fce9bcec",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "google_maps_url": {
+ "name": "google_maps_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_latitude": {
+ "name": "admin_latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_longitude": {
+ "name": "admin_longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_flash": {
+ "name": "is_flash",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_ids": {
+ "name": "group_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cancelled_by_admin": {
+ "name": "is_cancelled_by_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_flash_delivery": {
+ "name": "is_flash_delivery",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_flash_available": {
+ "name": "is_flash_available",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "flash_price": {
+ "name": "flash_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "product_quantity": {
+ "name": "product_quantity",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "related_stores": {
+ "name": "related_stores",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_notifications": {
+ "name": "user_notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "body": {
+ "name": "body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicable_users": {
+ "name": "applicable_users",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_permanent": {
+ "name": "is_permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0073_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0073_snapshot.json
new file mode 100644
index 0000000..1d50238
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0073_snapshot.json
@@ -0,0 +1,3691 @@
+{
+ "id": "96b766f9-646c-4a90-a1b0-19a01fc1188c",
+ "prevId": "66373351-55c5-4990-bb31-8dd9bf22016c",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "google_maps_url": {
+ "name": "google_maps_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_latitude": {
+ "name": "admin_latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_longitude": {
+ "name": "admin_longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_flash": {
+ "name": "is_flash",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_ids": {
+ "name": "group_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cancelled_by_admin": {
+ "name": "is_cancelled_by_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_flash_delivery": {
+ "name": "is_flash_delivery",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_flash_available": {
+ "name": "is_flash_available",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "flash_price": {
+ "name": "flash_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "product_quantity": {
+ "name": "product_quantity",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "related_stores": {
+ "name": "related_stores",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_notifications": {
+ "name": "user_notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "body": {
+ "name": "body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicable_users": {
+ "name": "applicable_users",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_permanent": {
+ "name": "is_permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0074_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0074_snapshot.json
new file mode 100644
index 0000000..19b344c
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0074_snapshot.json
@@ -0,0 +1,3698 @@
+{
+ "id": "d5792792-dff1-4dbc-97e8-ca51c413ce24",
+ "prevId": "96b766f9-646c-4a90-a1b0-19a01fc1188c",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "google_maps_url": {
+ "name": "google_maps_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_latitude": {
+ "name": "admin_latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_longitude": {
+ "name": "admin_longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_flash": {
+ "name": "is_flash",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_capacity_full": {
+ "name": "is_capacity_full",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_ids": {
+ "name": "group_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cancelled_by_admin": {
+ "name": "is_cancelled_by_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_flash_delivery": {
+ "name": "is_flash_delivery",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_flash_available": {
+ "name": "is_flash_available",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "flash_price": {
+ "name": "flash_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "product_quantity": {
+ "name": "product_quantity",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "related_stores": {
+ "name": "related_stores",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_notifications": {
+ "name": "user_notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "body": {
+ "name": "body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicable_users": {
+ "name": "applicable_users",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_permanent": {
+ "name": "is_permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0075_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0075_snapshot.json
new file mode 100644
index 0000000..e07c081
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0075_snapshot.json
@@ -0,0 +1,3755 @@
+{
+ "id": "327cc259-efc0-44ff-b581-2dd28869acdb",
+ "prevId": "d5792792-dff1-4dbc-97e8-ca51c413ce24",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "google_maps_url": {
+ "name": "google_maps_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_latitude": {
+ "name": "admin_latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_longitude": {
+ "name": "admin_longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_flash": {
+ "name": "is_flash",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_capacity_full": {
+ "name": "is_capacity_full",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_ids": {
+ "name": "group_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cancelled_by_admin": {
+ "name": "is_cancelled_by_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_flash_delivery": {
+ "name": "is_flash_delivery",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_flash_available": {
+ "name": "is_flash_available",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "flash_price": {
+ "name": "flash_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "product_quantity": {
+ "name": "product_quantity",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "related_stores": {
+ "name": "related_stores",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.unlogged_user_tokens": {
+ "name": "unlogged_user_tokens",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "unlogged_user_tokens_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unlogged_user_tokens_token_unique": {
+ "name": "unlogged_user_tokens_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_notifications": {
+ "name": "user_notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "body": {
+ "name": "body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicable_users": {
+ "name": "applicable_users",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_permanent": {
+ "name": "is_permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/0076_snapshot.json b/packages/db_helper_postgres/drizzle/meta/0076_snapshot.json
new file mode 100644
index 0000000..b2c4e90
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/0076_snapshot.json
@@ -0,0 +1,3865 @@
+{
+ "id": "26c2b560-e848-451d-b8f4-0cbd68e3ea4e",
+ "prevId": "327cc259-efc0-44ff-b581-2dd28869acdb",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "mf.address_areas": {
+ "name": "address_areas",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_areas_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "place_name": {
+ "name": "place_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "address_areas_zone_id_address_zones_id_fk": {
+ "name": "address_areas_zone_id_address_zones_id_fk",
+ "tableFrom": "address_areas",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.address_zones": {
+ "name": "address_zones",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "address_zones_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "zone_name": {
+ "name": "zone_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.addresses": {
+ "name": "addresses",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "addresses_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "phone": {
+ "name": "phone",
+ "type": "varchar(15)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line1": {
+ "name": "address_line1",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_line2": {
+ "name": "address_line2",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "city": {
+ "name": "city",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state": {
+ "name": "state",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pincode": {
+ "name": "pincode",
+ "type": "varchar(10)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "latitude": {
+ "name": "latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "longitude": {
+ "name": "longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "google_maps_url": {
+ "name": "google_maps_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_latitude": {
+ "name": "admin_latitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_longitude": {
+ "name": "admin_longitude",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "zone_id": {
+ "name": "zone_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "addresses_user_id_users_id_fk": {
+ "name": "addresses_user_id_users_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "addresses_zone_id_address_zones_id_fk": {
+ "name": "addresses_zone_id_address_zones_id_fk",
+ "tableFrom": "addresses",
+ "tableTo": "address_zones",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "zone_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.cart_items": {
+ "name": "cart_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "cart_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "cart_items_user_id_users_id_fk": {
+ "name": "cart_items_user_id_users_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "cart_items_product_id_product_info_id_fk": {
+ "name": "cart_items_product_id_product_info_id_fk",
+ "tableFrom": "cart_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_user_product": {
+ "name": "unique_user_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.complaints": {
+ "name": "complaints",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "complaints_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "complaint_body": {
+ "name": "complaint_body",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "response": {
+ "name": "response",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_resolved": {
+ "name": "is_resolved",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "complaints_user_id_users_id_fk": {
+ "name": "complaints_user_id_users_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "complaints_order_id_orders_id_fk": {
+ "name": "complaints_order_id_orders_id_fk",
+ "tableFrom": "complaints",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_products": {
+ "name": "coupon_applicable_products",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_products_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_products_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_products_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_products_product_id_product_info_id_fk": {
+ "name": "coupon_applicable_products_product_id_product_info_id_fk",
+ "tableFrom": "coupon_applicable_products",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_product": {
+ "name": "unique_coupon_product",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "product_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_applicable_users": {
+ "name": "coupon_applicable_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_applicable_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_applicable_users_coupon_id_coupons_id_fk": {
+ "name": "coupon_applicable_users_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_applicable_users_user_id_users_id_fk": {
+ "name": "coupon_applicable_users_user_id_users_id_fk",
+ "tableFrom": "coupon_applicable_users",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_user": {
+ "name": "unique_coupon_user",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_id",
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupon_usage": {
+ "name": "coupon_usage",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupon_usage_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_id": {
+ "name": "coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_item_id": {
+ "name": "order_item_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupon_usage_user_id_users_id_fk": {
+ "name": "coupon_usage_user_id_users_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_coupon_id_coupons_id_fk": {
+ "name": "coupon_usage_coupon_id_coupons_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_id_orders_id_fk": {
+ "name": "coupon_usage_order_id_orders_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "coupon_usage_order_item_id_order_items_id_fk": {
+ "name": "coupon_usage_order_item_id_order_items_id_fk",
+ "tableFrom": "coupon_usage",
+ "tableTo": "order_items",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_item_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.coupons": {
+ "name": "coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_user_based": {
+ "name": "is_user_based",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_apply_for_all": {
+ "name": "is_apply_for_all",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_invalidated": {
+ "name": "is_invalidated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "coupons_created_by_staff_users_id_fk": {
+ "name": "coupons_created_by_staff_users_id_fk",
+ "tableFrom": "coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_coupon_code": {
+ "name": "unique_coupon_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "coupon_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.delivery_slot_info": {
+ "name": "delivery_slot_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "delivery_slot_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "delivery_time": {
+ "name": "delivery_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "freeze_time": {
+ "name": "freeze_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "is_flash": {
+ "name": "is_flash",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_capacity_full": {
+ "name": "is_capacity_full",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "delivery_sequence": {
+ "name": "delivery_sequence",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "group_ids": {
+ "name": "group_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.home_banners": {
+ "name": "home_banners",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "home_banners_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redirect_url": {
+ "name": "redirect_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "serial_num": {
+ "name": "serial_num",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_updated": {
+ "name": "last_updated",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.key_val_store": {
+ "name": "key_val_store",
+ "schema": "mf",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notif_creds": {
+ "name": "notif_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notif_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notif_creds_user_id_users_id_fk": {
+ "name": "notif_creds_user_id_users_id_fk",
+ "tableFrom": "notif_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "notif_creds_token_unique": {
+ "name": "notif_creds_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.notifications": {
+ "name": "notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "body": {
+ "name": "body",
+ "type": "varchar(512)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_read": {
+ "name": "is_read",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notifications_user_id_users_id_fk": {
+ "name": "notifications_user_id_users_id_fk",
+ "tableFrom": "notifications",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_items": {
+ "name": "order_items",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_items_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discounted_price": {
+ "name": "discounted_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_package_verified": {
+ "name": "is_package_verified",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_items_order_id_orders_id_fk": {
+ "name": "order_items_order_id_orders_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_items_product_id_product_info_id_fk": {
+ "name": "order_items_product_id_product_info_id_fk",
+ "tableFrom": "order_items",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.order_status": {
+ "name": "order_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "order_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_time": {
+ "name": "order_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_packaged": {
+ "name": "is_packaged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_delivered": {
+ "name": "is_delivered",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_cancelled": {
+ "name": "is_cancelled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancel_reason": {
+ "name": "cancel_reason",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cancelled_by_admin": {
+ "name": "is_cancelled_by_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payment_state": {
+ "name": "payment_state",
+ "type": "payment_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "cancellation_user_notes": {
+ "name": "cancellation_user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_admin_notes": {
+ "name": "cancellation_admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cancellation_reviewed": {
+ "name": "cancellation_reviewed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "cancellation_reviewed_at": {
+ "name": "cancellation_reviewed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_coupon_id": {
+ "name": "refund_coupon_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "order_status_user_id_users_id_fk": {
+ "name": "order_status_user_id_users_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_order_id_orders_id_fk": {
+ "name": "order_status_order_id_orders_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "order_status_refund_coupon_id_coupons_id_fk": {
+ "name": "order_status_refund_coupon_id_coupons_id_fk",
+ "tableFrom": "order_status",
+ "tableTo": "coupons",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "refund_coupon_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.orders": {
+ "name": "orders",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "orders_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "address_id": {
+ "name": "address_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_cod": {
+ "name": "is_cod",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_online_payment": {
+ "name": "is_online_payment",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payment_info_id": {
+ "name": "payment_info_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "total_amount": {
+ "name": "total_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "delivery_charge": {
+ "name": "delivery_charge",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'0'"
+ },
+ "readable_id": {
+ "name": "readable_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_notes": {
+ "name": "admin_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_notes": {
+ "name": "user_notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_id": {
+ "name": "order_group_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order_group_proportion": {
+ "name": "order_group_proportion",
+ "type": "numeric(10, 4)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_flash_delivery": {
+ "name": "is_flash_delivery",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "orders_user_id_users_id_fk": {
+ "name": "orders_user_id_users_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_address_id_addresses_id_fk": {
+ "name": "orders_address_id_addresses_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "addresses",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "address_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_slot_id_delivery_slot_info_id_fk": {
+ "name": "orders_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "orders_payment_info_id_payment_info_id_fk": {
+ "name": "orders_payment_info_id_payment_info_id_fk",
+ "tableFrom": "orders",
+ "tableTo": "payment_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "payment_info_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payment_info": {
+ "name": "payment_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payment_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payment_info_merchant_order_id_unique": {
+ "name": "payment_info_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.payments": {
+ "name": "payments",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "payments_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "gateway": {
+ "name": "gateway",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "merchant_order_id": {
+ "name": "merchant_order_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "payload": {
+ "name": "payload",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "payments_order_id_orders_id_fk": {
+ "name": "payments_order_id_orders_id_fk",
+ "tableFrom": "payments",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "payments_merchant_order_id_unique": {
+ "name": "payments_merchant_order_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "merchant_order_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_categories": {
+ "name": "product_categories",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_categories_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_info": {
+ "name": "product_group_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_group_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "group_name": {
+ "name": "group_name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_group_membership": {
+ "name": "product_group_membership",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "group_id": {
+ "name": "group_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_group_membership_product_id_product_info_id_fk": {
+ "name": "product_group_membership_product_id_product_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_group_membership_group_id_product_group_info_id_fk": {
+ "name": "product_group_membership_group_id_product_group_info_id_fk",
+ "tableFrom": "product_group_membership",
+ "tableTo": "product_group_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "group_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_group_membership_pk": {
+ "name": "product_group_membership_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "group_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_info": {
+ "name": "product_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "short_description": {
+ "name": "short_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "long_description": {
+ "name": "long_description",
+ "type": "varchar(1000)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "unit_id": {
+ "name": "unit_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "market_price": {
+ "name": "market_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "images": {
+ "name": "images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_out_of_stock": {
+ "name": "is_out_of_stock",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_flash_available": {
+ "name": "is_flash_available",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "flash_price": {
+ "name": "flash_price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "increment_step": {
+ "name": "increment_step",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "product_quantity": {
+ "name": "product_quantity",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "store_id": {
+ "name": "store_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_info_unit_id_units_id_fk": {
+ "name": "product_info_unit_id_units_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "units",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "unit_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_info_store_id_store_info_id_fk": {
+ "name": "product_info_store_id_store_info_id_fk",
+ "tableFrom": "product_info",
+ "tableTo": "store_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "store_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_reviews": {
+ "name": "product_reviews",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_reviews_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "review_body": {
+ "name": "review_body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_urls": {
+ "name": "image_urls",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "review_time": {
+ "name": "review_time",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "ratings": {
+ "name": "ratings",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "admin_response": {
+ "name": "admin_response",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "admin_response_images": {
+ "name": "admin_response_images",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_reviews_user_id_users_id_fk": {
+ "name": "product_reviews_user_id_users_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_reviews_product_id_product_info_id_fk": {
+ "name": "product_reviews_product_id_product_info_id_fk",
+ "tableFrom": "product_reviews",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {
+ "rating_check": {
+ "name": "rating_check",
+ "value": "\"mf\".\"product_reviews\".\"ratings\" >= 1 AND \"mf\".\"product_reviews\".\"ratings\" <= 5"
+ }
+ },
+ "isRLSEnabled": false
+ },
+ "mf.product_slots": {
+ "name": "product_slots",
+ "schema": "mf",
+ "columns": {
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_slots_product_id_product_info_id_fk": {
+ "name": "product_slots_product_id_product_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_slots_slot_id_delivery_slot_info_id_fk": {
+ "name": "product_slots_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "product_slots",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_slot_pk": {
+ "name": "product_slot_pk",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "slot_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tag_info": {
+ "name": "product_tag_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tag_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "tag_name": {
+ "name": "tag_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_description": {
+ "name": "tag_description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_dashboard_tag": {
+ "name": "is_dashboard_tag",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "related_stores": {
+ "name": "related_stores",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "product_tag_info_tag_name_unique": {
+ "name": "product_tag_info_tag_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "tag_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.product_tags": {
+ "name": "product_tags",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "product_tags_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag_id": {
+ "name": "tag_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "assigned_at": {
+ "name": "assigned_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "product_tags_product_id_product_info_id_fk": {
+ "name": "product_tags_product_id_product_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "product_tags_tag_id_product_tag_info_id_fk": {
+ "name": "product_tags_tag_id_product_tag_info_id_fk",
+ "tableFrom": "product_tags",
+ "tableTo": "product_tag_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "tag_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_product_tag": {
+ "name": "unique_product_tag",
+ "nullsNotDistinct": false,
+ "columns": [
+ "product_id",
+ "tag_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.refunds": {
+ "name": "refunds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "refunds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "refund_amount": {
+ "name": "refund_amount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_status": {
+ "name": "refund_status",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'none'"
+ },
+ "merchant_refund_id": {
+ "name": "merchant_refund_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "refund_processed_at": {
+ "name": "refund_processed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "refunds_order_id_orders_id_fk": {
+ "name": "refunds_order_id_orders_id_fk",
+ "tableFrom": "refunds",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.reserved_coupons": {
+ "name": "reserved_coupons",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "reserved_coupons_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "secret_code": {
+ "name": "secret_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "coupon_code": {
+ "name": "coupon_code",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "discount_percent": {
+ "name": "discount_percent",
+ "type": "numeric(5, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "flat_discount": {
+ "name": "flat_discount",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "min_order": {
+ "name": "min_order",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_value": {
+ "name": "max_value",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "max_limit_for_user": {
+ "name": "max_limit_for_user",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "exclusive_apply": {
+ "name": "exclusive_apply",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_redeemed": {
+ "name": "is_redeemed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "redeemed_by": {
+ "name": "redeemed_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "redeemed_at": {
+ "name": "redeemed_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_by": {
+ "name": "created_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "reserved_coupons_redeemed_by_users_id_fk": {
+ "name": "reserved_coupons_redeemed_by_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "redeemed_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "reserved_coupons_created_by_staff_users_id_fk": {
+ "name": "reserved_coupons_created_by_staff_users_id_fk",
+ "tableFrom": "reserved_coupons",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "created_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "reserved_coupons_secret_code_unique": {
+ "name": "reserved_coupons_secret_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ },
+ "unique_secret_code": {
+ "name": "unique_secret_code",
+ "nullsNotDistinct": false,
+ "columns": [
+ "secret_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.special_deals": {
+ "name": "special_deals",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "special_deals_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "product_id": {
+ "name": "product_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "quantity": {
+ "name": "quantity",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "price": {
+ "name": "price",
+ "type": "numeric(10, 2)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "special_deals_product_id_product_info_id_fk": {
+ "name": "special_deals_product_id_product_info_id_fk",
+ "tableFrom": "special_deals",
+ "tableTo": "product_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "product_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_permissions": {
+ "name": "staff_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "permission_name": {
+ "name": "permission_name",
+ "type": "staff_permission",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_permission_name": {
+ "name": "unique_permission_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "permission_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_role_permissions": {
+ "name": "staff_role_permissions",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_role_permissions_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_permission_id": {
+ "name": "staff_permission_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_role_permissions_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_role_permissions_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "staff_role_permissions_staff_permission_id_staff_permissions_id_fk": {
+ "name": "staff_role_permissions_staff_permission_id_staff_permissions_id_fk",
+ "tableFrom": "staff_role_permissions",
+ "tableTo": "staff_permissions",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_permission_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_permission": {
+ "name": "unique_role_permission",
+ "nullsNotDistinct": false,
+ "columns": [
+ "staff_role_id",
+ "staff_permission_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_roles": {
+ "name": "staff_roles",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_roles_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "role_name": {
+ "name": "role_name",
+ "type": "staff_role",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_role_name": {
+ "name": "unique_role_name",
+ "nullsNotDistinct": false,
+ "columns": [
+ "role_name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.staff_users": {
+ "name": "staff_users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "staff_users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password": {
+ "name": "password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "staff_role_id": {
+ "name": "staff_role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "staff_users_staff_role_id_staff_roles_id_fk": {
+ "name": "staff_users_staff_role_id_staff_roles_id_fk",
+ "tableFrom": "staff_users",
+ "tableTo": "staff_roles",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "staff_role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.store_info": {
+ "name": "store_info",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "store_info_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "owner": {
+ "name": "owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "store_info_owner_staff_users_id_fk": {
+ "name": "store_info_owner_staff_users_id_fk",
+ "tableFrom": "store_info",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "owner"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.units": {
+ "name": "units",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "units_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "short_notation": {
+ "name": "short_notation",
+ "type": "varchar(50)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "full_name": {
+ "name": "full_name",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_short_notation": {
+ "name": "unique_short_notation",
+ "nullsNotDistinct": false,
+ "columns": [
+ "short_notation"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.unlogged_user_tokens": {
+ "name": "unlogged_user_tokens",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "unlogged_user_tokens_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "token": {
+ "name": "token",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "last_verified": {
+ "name": "last_verified",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unlogged_user_tokens_token_unique": {
+ "name": "unlogged_user_tokens_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.upload_url_status": {
+ "name": "upload_url_status",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "upload_url_status_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "key": {
+ "name": "key",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "upload_status",
+ "typeSchema": "public",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_creds": {
+ "name": "user_creds",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_creds_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_password": {
+ "name": "user_password",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_creds_user_id_users_id_fk": {
+ "name": "user_creds_user_id_users_id_fk",
+ "tableFrom": "user_creds",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_details": {
+ "name": "user_details",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_details_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "bio": {
+ "name": "bio",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_of_birth": {
+ "name": "date_of_birth",
+ "type": "date",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "gender": {
+ "name": "gender",
+ "type": "varchar(20)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "occupation": {
+ "name": "occupation",
+ "type": "varchar(100)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "profile_image": {
+ "name": "profile_image",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_suspended": {
+ "name": "is_suspended",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_details_user_id_users_id_fk": {
+ "name": "user_details_user_id_users_id_fk",
+ "tableFrom": "user_details",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_details_user_id_unique": {
+ "name": "user_details_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_incidents": {
+ "name": "user_incidents",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_incidents_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order_id": {
+ "name": "order_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "date_added": {
+ "name": "date_added",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "admin_comment": {
+ "name": "admin_comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "added_by": {
+ "name": "added_by",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "negativity_score": {
+ "name": "negativity_score",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_incidents_user_id_users_id_fk": {
+ "name": "user_incidents_user_id_users_id_fk",
+ "tableFrom": "user_incidents",
+ "tableTo": "users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "user_incidents_order_id_orders_id_fk": {
+ "name": "user_incidents_order_id_orders_id_fk",
+ "tableFrom": "user_incidents",
+ "tableTo": "orders",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "order_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ },
+ "user_incidents_added_by_staff_users_id_fk": {
+ "name": "user_incidents_added_by_staff_users_id_fk",
+ "tableFrom": "user_incidents",
+ "tableTo": "staff_users",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "added_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.user_notifications": {
+ "name": "user_notifications",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "user_notifications_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "title": {
+ "name": "title",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "image_url": {
+ "name": "image_url",
+ "type": "varchar(500)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ },
+ "body": {
+ "name": "body",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "applicable_users": {
+ "name": "applicable_users",
+ "type": "jsonb",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.users": {
+ "name": "users",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "users_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "email": {
+ "name": "email",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mobile": {
+ "name": "mobile",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "unique_email": {
+ "name": "unique_email",
+ "nullsNotDistinct": false,
+ "columns": [
+ "email"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "mf.vendor_snippets": {
+ "name": "vendor_snippets",
+ "schema": "mf",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "identity": {
+ "type": "always",
+ "name": "vendor_snippets_id_seq",
+ "schema": "mf",
+ "increment": "1",
+ "startWith": "1",
+ "minValue": "1",
+ "maxValue": "2147483647",
+ "cache": "1",
+ "cycle": false
+ }
+ },
+ "snippet_code": {
+ "name": "snippet_code",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "slot_id": {
+ "name": "slot_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_permanent": {
+ "name": "is_permanent",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "product_ids": {
+ "name": "product_ids",
+ "type": "integer[]",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_till": {
+ "name": "valid_till",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "timestamp",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "now()"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vendor_snippets_slot_id_delivery_slot_info_id_fk": {
+ "name": "vendor_snippets_slot_id_delivery_slot_info_id_fk",
+ "tableFrom": "vendor_snippets",
+ "tableTo": "delivery_slot_info",
+ "schemaTo": "mf",
+ "columnsFrom": [
+ "slot_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "no action",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vendor_snippets_snippet_code_unique": {
+ "name": "vendor_snippets_snippet_code_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "snippet_code"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {
+ "public.payment_status": {
+ "name": "payment_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "success",
+ "cod",
+ "failed"
+ ]
+ },
+ "public.staff_permission": {
+ "name": "staff_permission",
+ "schema": "public",
+ "values": [
+ "crud_product",
+ "make_coupon",
+ "crud_staff_users"
+ ]
+ },
+ "public.staff_role": {
+ "name": "staff_role",
+ "schema": "public",
+ "values": [
+ "super_admin",
+ "admin",
+ "marketer",
+ "delivery_staff"
+ ]
+ },
+ "public.upload_status": {
+ "name": "upload_status",
+ "schema": "public",
+ "values": [
+ "pending",
+ "claimed"
+ ]
+ }
+ },
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/drizzle/meta/_journal.json b/packages/db_helper_postgres/drizzle/meta/_journal.json
new file mode 100644
index 0000000..572b813
--- /dev/null
+++ b/packages/db_helper_postgres/drizzle/meta/_journal.json
@@ -0,0 +1,545 @@
+{
+ "version": "7",
+ "dialect": "postgresql",
+ "entries": [
+ {
+ "idx": 0,
+ "version": "7",
+ "when": 1760786001791,
+ "tag": "0000_colorful_tinkerer",
+ "breakpoints": true
+ },
+ {
+ "idx": 1,
+ "version": "7",
+ "when": 1760786267753,
+ "tag": "0001_busy_titania",
+ "breakpoints": true
+ },
+ {
+ "idx": 2,
+ "version": "7",
+ "when": 1760876962326,
+ "tag": "0002_wandering_lifeguard",
+ "breakpoints": true
+ },
+ {
+ "idx": 3,
+ "version": "7",
+ "when": 1760945207890,
+ "tag": "0003_tricky_the_twelve",
+ "breakpoints": true
+ },
+ {
+ "idx": 4,
+ "version": "7",
+ "when": 1760947179526,
+ "tag": "0004_lively_diamondback",
+ "breakpoints": true
+ },
+ {
+ "idx": 5,
+ "version": "7",
+ "when": 1760950341110,
+ "tag": "0005_tricky_warhawk",
+ "breakpoints": true
+ },
+ {
+ "idx": 6,
+ "version": "7",
+ "when": 1761023107917,
+ "tag": "0006_outstanding_joystick",
+ "breakpoints": true
+ },
+ {
+ "idx": 7,
+ "version": "7",
+ "when": 1761034327944,
+ "tag": "0007_yellow_charles_xavier",
+ "breakpoints": true
+ },
+ {
+ "idx": 8,
+ "version": "7",
+ "when": 1761034912967,
+ "tag": "0008_nasty_mathemanic",
+ "breakpoints": true
+ },
+ {
+ "idx": 9,
+ "version": "7",
+ "when": 1761044394994,
+ "tag": "0009_peaceful_victor_mancha",
+ "breakpoints": true
+ },
+ {
+ "idx": 10,
+ "version": "7",
+ "when": 1761046587669,
+ "tag": "0010_flimsy_reavers",
+ "breakpoints": true
+ },
+ {
+ "idx": 11,
+ "version": "7",
+ "when": 1761046972821,
+ "tag": "0011_watery_lady_mastermind",
+ "breakpoints": true
+ },
+ {
+ "idx": 12,
+ "version": "7",
+ "when": 1761052893579,
+ "tag": "0012_flawless_jubilee",
+ "breakpoints": true
+ },
+ {
+ "idx": 13,
+ "version": "7",
+ "when": 1761053583551,
+ "tag": "0013_married_celestials",
+ "breakpoints": true
+ },
+ {
+ "idx": 14,
+ "version": "7",
+ "when": 1761140705850,
+ "tag": "0014_blushing_switch",
+ "breakpoints": true
+ },
+ {
+ "idx": 15,
+ "version": "7",
+ "when": 1761417716685,
+ "tag": "0015_sloppy_boomerang",
+ "breakpoints": true
+ },
+ {
+ "idx": 16,
+ "version": "7",
+ "when": 1761420500681,
+ "tag": "0016_eminent_thunderbolt_ross",
+ "breakpoints": true
+ },
+ {
+ "idx": 17,
+ "version": "7",
+ "when": 1761422687927,
+ "tag": "0017_steady_moira_mactaggert",
+ "breakpoints": true
+ },
+ {
+ "idx": 18,
+ "version": "7",
+ "when": 1761765314589,
+ "tag": "0018_simple_tomorrow_man",
+ "breakpoints": true
+ },
+ {
+ "idx": 19,
+ "version": "7",
+ "when": 1761766904923,
+ "tag": "0019_productive_mulholland_black",
+ "breakpoints": true
+ },
+ {
+ "idx": 20,
+ "version": "7",
+ "when": 1761929874782,
+ "tag": "0020_narrow_charles_xavier",
+ "breakpoints": true
+ },
+ {
+ "idx": 21,
+ "version": "7",
+ "when": 1761935119476,
+ "tag": "0021_little_spot",
+ "breakpoints": true
+ },
+ {
+ "idx": 22,
+ "version": "7",
+ "when": 1761936019322,
+ "tag": "0022_flippant_omega_sentinel",
+ "breakpoints": true
+ },
+ {
+ "idx": 23,
+ "version": "7",
+ "when": 1761990924450,
+ "tag": "0023_sparkling_starjammers",
+ "breakpoints": true
+ },
+ {
+ "idx": 24,
+ "version": "7",
+ "when": 1761990966682,
+ "tag": "0024_typical_the_twelve",
+ "breakpoints": true
+ },
+ {
+ "idx": 25,
+ "version": "7",
+ "when": 1762598863704,
+ "tag": "0025_tricky_plazm",
+ "breakpoints": true
+ },
+ {
+ "idx": 26,
+ "version": "7",
+ "when": 1762599227157,
+ "tag": "0026_flippant_spiral",
+ "breakpoints": true
+ },
+ {
+ "idx": 27,
+ "version": "7",
+ "when": 1762600106583,
+ "tag": "0027_huge_iron_monger",
+ "breakpoints": true
+ },
+ {
+ "idx": 28,
+ "version": "7",
+ "when": 1762624949568,
+ "tag": "0028_clever_anthem",
+ "breakpoints": true
+ },
+ {
+ "idx": 29,
+ "version": "7",
+ "when": 1762958926686,
+ "tag": "0029_short_king_cobra",
+ "breakpoints": true
+ },
+ {
+ "idx": 30,
+ "version": "7",
+ "when": 1763058797153,
+ "tag": "0030_superb_exiles",
+ "breakpoints": true
+ },
+ {
+ "idx": 31,
+ "version": "7",
+ "when": 1763060107438,
+ "tag": "0031_clean_the_hunter",
+ "breakpoints": true
+ },
+ {
+ "idx": 32,
+ "version": "7",
+ "when": 1763281196495,
+ "tag": "0032_tricky_baron_zemo",
+ "breakpoints": true
+ },
+ {
+ "idx": 33,
+ "version": "7",
+ "when": 1763794531144,
+ "tag": "0033_brainy_skullbuster",
+ "breakpoints": true
+ },
+ {
+ "idx": 34,
+ "version": "7",
+ "when": 1764325098973,
+ "tag": "0034_yummy_riptide",
+ "breakpoints": true
+ },
+ {
+ "idx": 35,
+ "version": "7",
+ "when": 1764328719715,
+ "tag": "0035_lyrical_spencer_smythe",
+ "breakpoints": true
+ },
+ {
+ "idx": 36,
+ "version": "7",
+ "when": 1764331069699,
+ "tag": "0036_eager_naoko",
+ "breakpoints": true
+ },
+ {
+ "idx": 37,
+ "version": "7",
+ "when": 1764356000382,
+ "tag": "0037_pale_outlaw_kid",
+ "breakpoints": true
+ },
+ {
+ "idx": 38,
+ "version": "7",
+ "when": 1764360189368,
+ "tag": "0038_volatile_jean_grey",
+ "breakpoints": true
+ },
+ {
+ "idx": 39,
+ "version": "7",
+ "when": 1764387227083,
+ "tag": "0039_last_silver_samurai",
+ "breakpoints": true
+ },
+ {
+ "idx": 40,
+ "version": "7",
+ "when": 1764387505378,
+ "tag": "0040_brief_albert_cleary",
+ "breakpoints": true
+ },
+ {
+ "idx": 41,
+ "version": "7",
+ "when": 1764435551419,
+ "tag": "0041_fine_kronos",
+ "breakpoints": true
+ },
+ {
+ "idx": 42,
+ "version": "7",
+ "when": 1764478346852,
+ "tag": "0042_organic_phil_sheldon",
+ "breakpoints": true
+ },
+ {
+ "idx": 43,
+ "version": "7",
+ "when": 1765085944941,
+ "tag": "0043_natural_joystick",
+ "breakpoints": true
+ },
+ {
+ "idx": 44,
+ "version": "7",
+ "when": 1765214759961,
+ "tag": "0044_rapid_meltdown",
+ "breakpoints": true
+ },
+ {
+ "idx": 45,
+ "version": "7",
+ "when": 1765393363992,
+ "tag": "0045_puzzling_leader",
+ "breakpoints": true
+ },
+ {
+ "idx": 46,
+ "version": "7",
+ "when": 1765890940636,
+ "tag": "0046_old_aaron_stack",
+ "breakpoints": true
+ },
+ {
+ "idx": 47,
+ "version": "7",
+ "when": 1765907188857,
+ "tag": "0047_dark_lester",
+ "breakpoints": true
+ },
+ {
+ "idx": 48,
+ "version": "7",
+ "when": 1766289001009,
+ "tag": "0048_talented_stature",
+ "breakpoints": true
+ },
+ {
+ "idx": 49,
+ "version": "7",
+ "when": 1766889876535,
+ "tag": "0049_lowly_silverclaw",
+ "breakpoints": true
+ },
+ {
+ "idx": 50,
+ "version": "7",
+ "when": 1766926392171,
+ "tag": "0050_fantastic_leopardon",
+ "breakpoints": true
+ },
+ {
+ "idx": 51,
+ "version": "7",
+ "when": 1767163284231,
+ "tag": "0051_rapid_typhoid_mary",
+ "breakpoints": true
+ },
+ {
+ "idx": 52,
+ "version": "7",
+ "when": 1767173986002,
+ "tag": "0052_pretty_captain_britain",
+ "breakpoints": true
+ },
+ {
+ "idx": 53,
+ "version": "7",
+ "when": 1767177522196,
+ "tag": "0053_volatile_salo",
+ "breakpoints": true
+ },
+ {
+ "idx": 54,
+ "version": "7",
+ "when": 1767181630135,
+ "tag": "0054_red_spyke",
+ "breakpoints": true
+ },
+ {
+ "idx": 55,
+ "version": "7",
+ "when": 1767181648828,
+ "tag": "0055_petite_fallen_one",
+ "breakpoints": true
+ },
+ {
+ "idx": 56,
+ "version": "7",
+ "when": 1767260845188,
+ "tag": "0056_fancy_satana",
+ "breakpoints": true
+ },
+ {
+ "idx": 57,
+ "version": "7",
+ "when": 1767261885187,
+ "tag": "0057_safe_earthquake",
+ "breakpoints": true
+ },
+ {
+ "idx": 58,
+ "version": "7",
+ "when": 1767637551901,
+ "tag": "0058_motionless_next_avengers",
+ "breakpoints": true
+ },
+ {
+ "idx": 59,
+ "version": "7",
+ "when": 1767791583921,
+ "tag": "0059_daily_spot",
+ "breakpoints": true
+ },
+ {
+ "idx": 60,
+ "version": "7",
+ "when": 1768228615788,
+ "tag": "0060_numerous_terror",
+ "breakpoints": true
+ },
+ {
+ "idx": 61,
+ "version": "7",
+ "when": 1768239828469,
+ "tag": "0061_calm_sir_ram",
+ "breakpoints": true
+ },
+ {
+ "idx": 62,
+ "version": "7",
+ "when": 1768242419782,
+ "tag": "0062_sloppy_sinister_six",
+ "breakpoints": true
+ },
+ {
+ "idx": 63,
+ "version": "7",
+ "when": 1768245308174,
+ "tag": "0063_friendly_mandarin",
+ "breakpoints": true
+ },
+ {
+ "idx": 64,
+ "version": "7",
+ "when": 1768280501802,
+ "tag": "0064_milky_revanche",
+ "breakpoints": true
+ },
+ {
+ "idx": 65,
+ "version": "7",
+ "when": 1768400243774,
+ "tag": "0065_whole_spencer_smythe",
+ "breakpoints": true
+ },
+ {
+ "idx": 66,
+ "version": "7",
+ "when": 1768710657343,
+ "tag": "0066_gorgeous_karnak",
+ "breakpoints": true
+ },
+ {
+ "idx": 67,
+ "version": "7",
+ "when": 1769280779210,
+ "tag": "0067_messy_earthquake",
+ "breakpoints": true
+ },
+ {
+ "idx": 68,
+ "version": "7",
+ "when": 1769709890336,
+ "tag": "0068_colossal_magma",
+ "breakpoints": true
+ },
+ {
+ "idx": 69,
+ "version": "7",
+ "when": 1769718702463,
+ "tag": "0069_violet_smiling_tiger",
+ "breakpoints": true
+ },
+ {
+ "idx": 70,
+ "version": "7",
+ "when": 1769958949864,
+ "tag": "0070_known_ares",
+ "breakpoints": true
+ },
+ {
+ "idx": 71,
+ "version": "7",
+ "when": 1770321591876,
+ "tag": "0071_moaning_shadow_king",
+ "breakpoints": true
+ },
+ {
+ "idx": 72,
+ "version": "7",
+ "when": 1770546741428,
+ "tag": "0072_flowery_deathbird",
+ "breakpoints": true
+ },
+ {
+ "idx": 73,
+ "version": "7",
+ "when": 1770561175889,
+ "tag": "0073_faithful_gravity",
+ "breakpoints": true
+ },
+ {
+ "idx": 74,
+ "version": "7",
+ "when": 1771674555093,
+ "tag": "0074_outgoing_black_cat",
+ "breakpoints": true
+ },
+ {
+ "idx": 75,
+ "version": "7",
+ "when": 1772196660983,
+ "tag": "0075_cuddly_rocket_racer",
+ "breakpoints": true
+ },
+ {
+ "idx": 76,
+ "version": "7",
+ "when": 1772637259874,
+ "tag": "0076_sturdy_wolverine",
+ "breakpoints": true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/db_helper_postgres/index.ts b/packages/db_helper_postgres/index.ts
new file mode 100644
index 0000000..a5f005e
--- /dev/null
+++ b/packages/db_helper_postgres/index.ts
@@ -0,0 +1,11 @@
+// Database Helper - PostgreSQL
+// Main entry point for the package
+
+// Re-export database connection
+export { db } from './src/db/db_index';
+
+// Re-export schema
+export * from './src/db/schema';
+
+// Re-export helper methods
+export * from './src/helper_methods/banner';
diff --git a/packages/db_helper_postgres/package.json b/packages/db_helper_postgres/package.json
new file mode 100644
index 0000000..b45295f
--- /dev/null
+++ b/packages/db_helper_postgres/package.json
@@ -0,0 +1,25 @@
+{
+ "name": "@packages/db_helper_postgres",
+ "version": "1.0.0",
+ "main": "index.ts",
+ "types": "index.ts",
+ "private": true,
+ "scripts": {
+ "migrate": "drizzle-kit generate:pg",
+ "db:push": "drizzle-kit push:pg",
+ "db:seed": "tsx src/db/seed.ts",
+ "db:studio": "drizzle-kit studio"
+ },
+ "dependencies": {
+ "dotenv": "^17.2.1",
+ "drizzle-orm": "^0.44.5",
+ "pg": "^8.16.3"
+ },
+ "devDependencies": {
+ "@types/node": "^24.5.2",
+ "@types/pg": "^8.15.5",
+ "drizzle-kit": "^0.31.4",
+ "tsx": "^4.20.5",
+ "typescript": "^5.9.2"
+ }
+}
diff --git a/packages/db_helper_postgres/src/db/db_index.ts b/packages/db_helper_postgres/src/db/db_index.ts
new file mode 100755
index 0000000..92cbfbb
--- /dev/null
+++ b/packages/db_helper_postgres/src/db/db_index.ts
@@ -0,0 +1,8 @@
+import { drizzle } from "drizzle-orm/node-postgres"
+import { migrate } from "drizzle-orm/node-postgres/migrator"
+import path from "path"
+import * as schema from "./schema"
+
+const db = drizzle({ connection: process.env.DATABASE_URL!, casing: "snake_case", schema: schema })
+// const db = drizzle('postgresql://postgres:postgres@localhost:2345/pooler');
+export { db }
diff --git a/packages/db_helper_postgres/src/db/porter.ts b/packages/db_helper_postgres/src/db/porter.ts
new file mode 100644
index 0000000..4173d6f
--- /dev/null
+++ b/packages/db_helper_postgres/src/db/porter.ts
@@ -0,0 +1,125 @@
+/*
+* This was a one time script to change the composition of the signed urls
+*/
+
+import { db } from '@/src/db/db_index'
+import {
+ userDetails,
+ productInfo,
+ productTagInfo,
+ complaints
+} from '@/src/db/schema';
+import { eq, not, isNull } from 'drizzle-orm';
+
+const S3_DOMAIN = 'https://s3.sgp.io.cloud.ovh.net';
+
+const cleanImageUrl = (url: string): string => {
+ if (url.startsWith(S3_DOMAIN)) {
+ return url.replace(S3_DOMAIN + '/', '');
+ }
+ return url;
+};
+
+const cleanImageUrls = (urls: string[]): string[] => {
+ return urls.map(cleanImageUrl);
+};
+
+async function migrateUserDetails() {
+ console.log('Migrating userDetails...');
+ const users = await db.select().from(userDetails).where(not(isNull(userDetails.profileImage)));
+
+ console.log(`Found ${users.length} user records with profile images`);
+
+ for (const user of users) {
+ if (user.profileImage) {
+ const cleanedUrl = cleanImageUrl(user.profileImage);
+ await db.update(userDetails)
+ .set({ profileImage: cleanedUrl })
+ .where(eq(userDetails.id, user.id));
+ }
+ }
+
+ console.log('userDetails migration completed');
+}
+
+async function migrateProductInfo() {
+ console.log('Migrating productInfo...');
+ const products = await db.select().from(productInfo).where(not(isNull(productInfo.images)));
+
+ console.log(`Found ${products.length} product records with images`);
+
+ for (const product of products) {
+ if (product.images && Array.isArray(product.images)) {
+ const cleanedUrls = cleanImageUrls(product.images);
+ await db.update(productInfo)
+ .set({ images: cleanedUrls })
+ .where(eq(productInfo.id, product.id));
+ }
+ }
+
+ console.log('productInfo migration completed');
+}
+
+async function migrateProductTagInfo() {
+ console.log('Migrating productTagInfo...');
+ const tags = await db.select().from(productTagInfo).where(not(isNull(productTagInfo.imageUrl)));
+
+ console.log(`Found ${tags.length} tag records with images`);
+
+ for (const tag of tags) {
+ if (tag.imageUrl) {
+ const cleanedUrl = cleanImageUrl(tag.imageUrl);
+ await db.update(productTagInfo)
+ .set({ imageUrl: cleanedUrl })
+ .where(eq(productTagInfo.id, tag.id));
+ }
+ }
+
+ console.log('productTagInfo migration completed');
+}
+
+async function migrateComplaints() {
+ console.log('Migrating complaints...');
+ const complaintRecords = await db.select().from(complaints).where(not(isNull(complaints.images)));
+
+ console.log(`Found ${complaintRecords.length} complaint records with images`);
+
+ for (const complaint of complaintRecords) {
+ if (complaint.images && Array.isArray(complaint.images)) {
+ const cleanedUrls = cleanImageUrls(complaint.images);
+ await db.update(complaints)
+ .set({ images: cleanedUrls })
+ .where(eq(complaints.id, complaint.id));
+ }
+ }
+
+ console.log('complaints migration completed');
+}
+
+async function runMigration() {
+ console.log('Starting image URL migration...');
+ console.log(`Removing S3 domain: ${S3_DOMAIN}`);
+
+ try {
+ await migrateUserDetails();
+ await migrateProductInfo();
+ await migrateProductTagInfo();
+ await migrateComplaints();
+
+ console.log('Migration completed successfully!');
+ } catch (error) {
+ console.error('Migration failed:', error);
+ throw error;
+ }
+}
+
+// Run the migration
+runMigration()
+ .then(() => {
+ console.log('Process completed successfully');
+ process.exit(0);
+ })
+ .catch((error) => {
+ console.error('Process failed:', error);
+ process.exit(1);
+ });
diff --git a/packages/db_helper_postgres/src/db/schema.ts b/packages/db_helper_postgres/src/db/schema.ts
new file mode 100755
index 0000000..a876101
--- /dev/null
+++ b/packages/db_helper_postgres/src/db/schema.ts
@@ -0,0 +1,689 @@
+import { pgTable, pgSchema, integer, varchar, date, boolean, timestamp, numeric, jsonb, pgEnum, unique, real, text, check, decimal } from "drizzle-orm/pg-core";
+import { relations, sql } from "drizzle-orm";
+
+const mf = pgSchema('mf');
+
+
+
+export const users = mf.table('users', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ name: varchar({ length: 255 }),
+ email: varchar({ length: 255 }),
+ mobile: varchar({ length: 255 }),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+}, (t) => ({
+ unq_email: unique('unique_email').on(t.email),
+}));
+
+export const userDetails = mf.table('user_details', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ userId: integer('user_id').notNull().references(() => users.id).unique(),
+ bio: varchar('bio', { length: 500 }),
+ dateOfBirth: date('date_of_birth'),
+ gender: varchar('gender', { length: 20 }),
+ occupation: varchar('occupation', { length: 100 }),
+ profileImage: varchar('profile_image', { length: 500 }),
+ isSuspended: boolean('is_suspended').notNull().default(false),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+ updatedAt: timestamp('updated_at').notNull().defaultNow(),
+});
+
+export const userCreds = mf.table('user_creds', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ userId: integer('user_id').notNull().references(() => users.id),
+ userPassword: varchar('user_password', { length: 255 }).notNull(),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+});
+
+export const addresses = mf.table('addresses', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ userId: integer('user_id').notNull().references(() => users.id),
+ name: varchar('name', { length: 255 }).notNull(),
+ phone: varchar('phone', { length: 15 }).notNull(),
+ addressLine1: varchar('address_line1', { length: 255 }).notNull(),
+ addressLine2: varchar('address_line2', { length: 255 }),
+ city: varchar('city', { length: 100 }).notNull(),
+ state: varchar('state', { length: 100 }).notNull(),
+ pincode: varchar('pincode', { length: 10 }).notNull(),
+ isDefault: boolean('is_default').notNull().default(false),
+ latitude: real('latitude'),
+ longitude: real('longitude'),
+ googleMapsUrl: varchar('google_maps_url', { length: 500 }),
+ adminLatitude: real('admin_latitude'),
+ adminLongitude: real('admin_longitude'),
+ zoneId: integer('zone_id').references(() => addressZones.id),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+});
+
+export const addressZones = mf.table('address_zones', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ zoneName: varchar('zone_name', { length: 255 }).notNull(),
+ addedAt: timestamp('added_at').notNull().defaultNow(),
+});
+
+export const addressAreas = mf.table('address_areas', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ placeName: varchar('place_name', { length: 255 }).notNull(),
+ zoneId: integer('zone_id').references(() => addressZones.id),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+});
+
+export const staffUsers = mf.table('staff_users', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ name: varchar({ length: 255 }).notNull(),
+ password: varchar({ length: 255 }).notNull(),
+ staffRoleId: integer('staff_role_id').references(() => staffRoles.id),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+});
+
+export const storeInfo = mf.table('store_info', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ name: varchar({ length: 255 }).notNull(),
+ description: varchar({ length: 500 }),
+ imageUrl: varchar('image_url', { length: 500 }),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+ owner: integer('owner').notNull().references(() => staffUsers.id),
+});
+
+export const units = mf.table('units', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ shortNotation: varchar('short_notation', { length: 50 }).notNull(),
+ fullName: varchar('full_name', { length: 100 }).notNull(),
+}, (t) => ({
+ unq_short_notation: unique('unique_short_notation').on(t.shortNotation),
+}));
+
+export const productInfo = mf.table('product_info', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ name: varchar({ length: 255 }).notNull(),
+ shortDescription: varchar('short_description', { length: 500 }),
+ longDescription: varchar('long_description', { length: 1000 }),
+ unitId: integer('unit_id').notNull().references(() => units.id),
+ price: numeric({ precision: 10, scale: 2 }).notNull(),
+ marketPrice: numeric('market_price', { precision: 10, scale: 2 }),
+ images: jsonb('images'),
+ isOutOfStock: boolean('is_out_of_stock').notNull().default(false),
+ isSuspended: boolean('is_suspended').notNull().default(false),
+ isFlashAvailable: boolean('is_flash_available').notNull().default(false),
+ flashPrice: numeric('flash_price', { precision: 10, scale: 2 }),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+ incrementStep: real('increment_step').notNull().default(1),
+ productQuantity: real('product_quantity').notNull().default(1),
+ storeId: integer('store_id').references(() => storeInfo.id),
+});
+
+export const productGroupInfo = mf.table('product_group_info', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ groupName: varchar('group_name', { length: 255 }).notNull(),
+ description: varchar({ length: 500 }),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+});
+
+export const productGroupMembership = mf.table('product_group_membership', {
+ productId: integer('product_id').notNull().references(() => productInfo.id),
+ groupId: integer('group_id').notNull().references(() => productGroupInfo.id),
+ addedAt: timestamp('added_at').notNull().defaultNow(),
+}, (t) => ({
+ pk: unique('product_group_membership_pk').on(t.productId, t.groupId),
+}));
+
+export const homeBanners = mf.table('home_banners', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ name: varchar('name', { length: 255 }).notNull(),
+ imageUrl: varchar('image_url', { length: 500 }).notNull(),
+ description: varchar('description', { length: 500 }),
+ productIds: integer('product_ids').array(),
+ redirectUrl: varchar('redirect_url', { length: 500 }),
+ serialNum: integer('serial_num'),
+ isActive: boolean('is_active').notNull().default(false),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+ lastUpdated: timestamp('last_updated').notNull().defaultNow(),
+});
+
+export const productReviews = mf.table('product_reviews', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ userId: integer('user_id').notNull().references(() => users.id),
+ productId: integer('product_id').notNull().references(() => productInfo.id),
+ reviewBody: text('review_body').notNull(),
+ imageUrls: jsonb('image_urls').$defaultFn(() => []),
+ reviewTime: timestamp('review_time').notNull().defaultNow(),
+ ratings: real('ratings').notNull(),
+ adminResponse: text('admin_response'),
+ adminResponseImages: jsonb('admin_response_images').$defaultFn(() => []),
+}, (t) => ({
+ ratingCheck: check('rating_check', sql`${t.ratings} >= 1 AND ${t.ratings} <= 5`),
+}));
+
+export const uploadStatusEnum = pgEnum('upload_status', ['pending', 'claimed']);
+
+export const staffRoleEnum = pgEnum('staff_role', ['super_admin', 'admin', 'marketer', 'delivery_staff']);
+
+export const staffPermissionEnum = pgEnum('staff_permission', ['crud_product', 'make_coupon', 'crud_staff_users']);
+
+export const uploadUrlStatus = mf.table('upload_url_status', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+ key: varchar('key', { length: 500 }).notNull(),
+ status: uploadStatusEnum('status').notNull().default('pending'),
+});
+
+export const productTagInfo = mf.table('product_tag_info', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ tagName: varchar('tag_name', { length: 100 }).notNull().unique(),
+ tagDescription: varchar('tag_description', { length: 500 }),
+ imageUrl: varchar('image_url', { length: 500 }),
+ isDashboardTag: boolean('is_dashboard_tag').notNull().default(false),
+ relatedStores: jsonb('related_stores').$defaultFn(() => []),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+});
+
+export const productTags = mf.table('product_tags', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ productId: integer('product_id').notNull().references(() => productInfo.id),
+ tagId: integer('tag_id').notNull().references(() => productTagInfo.id),
+ assignedAt: timestamp('assigned_at').notNull().defaultNow(),
+}, (t) => ({
+ unq_product_tag: unique('unique_product_tag').on(t.productId, t.tagId),
+}));
+
+export const deliverySlotInfo = mf.table('delivery_slot_info', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ deliveryTime: timestamp('delivery_time').notNull(),
+ freezeTime: timestamp('freeze_time').notNull(),
+ isActive: boolean('is_active').notNull().default(true),
+ isFlash: boolean('is_flash').notNull().default(false),
+ isCapacityFull: boolean('is_capacity_full').notNull().default(false),
+ deliverySequence: jsonb('delivery_sequence').$defaultFn(() => {}),
+ groupIds: jsonb('group_ids').$defaultFn(() => []),
+});
+
+export const vendorSnippets = mf.table('vendor_snippets', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ snippetCode: varchar('snippet_code', { length: 255 }).notNull().unique(),
+ slotId: integer('slot_id').references(() => deliverySlotInfo.id),
+ isPermanent: boolean('is_permanent').notNull().default(false),
+ productIds: integer('product_ids').array().notNull(),
+ validTill: timestamp('valid_till'),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+});
+
+export const vendorSnippetsRelations = relations(vendorSnippets, ({ one }) => ({
+ slot: one(deliverySlotInfo, { fields: [vendorSnippets.slotId], references: [deliverySlotInfo.id] }),
+}));
+
+export const productSlots = mf.table('product_slots', {
+ productId: integer('product_id').notNull().references(() => productInfo.id),
+ slotId: integer('slot_id').notNull().references(() => deliverySlotInfo.id),
+}, (t) => ({
+ pk: unique('product_slot_pk').on(t.productId, t.slotId),
+}));
+
+export const specialDeals = mf.table('special_deals', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ productId: integer('product_id').notNull().references(() => productInfo.id),
+ quantity: numeric({ precision: 10, scale: 2 }).notNull(),
+ price: numeric({ precision: 10, scale: 2 }).notNull(),
+ validTill: timestamp('valid_till').notNull(),
+});
+
+export const orders = mf.table('orders', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ userId: integer('user_id').notNull().references(() => users.id),
+ addressId: integer('address_id').notNull().references(() => addresses.id),
+ slotId: integer('slot_id').references(() => deliverySlotInfo.id),
+ isCod: boolean('is_cod').notNull().default(false),
+ isOnlinePayment: boolean('is_online_payment').notNull().default(false),
+ paymentInfoId: integer('payment_info_id').references(() => paymentInfoTable.id),
+ totalAmount: numeric('total_amount', { precision: 10, scale: 2 }).notNull(),
+ deliveryCharge: numeric('delivery_charge', { precision: 10, scale: 2 }).notNull().default('0'),
+ readableId: integer('readable_id').notNull(),
+ adminNotes: text('admin_notes'),
+ userNotes: text('user_notes'),
+ orderGroupId: varchar('order_group_id', { length: 255 }),
+ orderGroupProportion: decimal('order_group_proportion', { precision: 10, scale: 4 }),
+ isFlashDelivery: boolean('is_flash_delivery').notNull().default(false),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+});
+
+export const orderItems = mf.table('order_items', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ orderId: integer('order_id').notNull().references(() => orders.id),
+ productId: integer('product_id').notNull().references(() => productInfo.id),
+ quantity: varchar('quantity', { length: 50 }).notNull(),
+ price: numeric({ precision: 10, scale: 2 }).notNull(),
+ discountedPrice: numeric('discounted_price', { precision: 10, scale: 2 }),
+ is_packaged: boolean('is_packaged').notNull().default(false),
+ is_package_verified: boolean('is_package_verified').notNull().default(false),
+});
+
+export const paymentStatusEnum = pgEnum('payment_status', ['pending', 'success', 'cod', 'failed']);
+
+export const orderStatus = mf.table('order_status', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ orderTime: timestamp('order_time').notNull().defaultNow(),
+ userId: integer('user_id').notNull().references(() => users.id),
+ orderId: integer('order_id').notNull().references(() => orders.id),
+ isPackaged: boolean('is_packaged').notNull().default(false),
+ isDelivered: boolean('is_delivered').notNull().default(false),
+ isCancelled: boolean('is_cancelled').notNull().default(false),
+ cancelReason: varchar('cancel_reason', { length: 255 }),
+ isCancelledByAdmin: boolean('is_cancelled_by_admin'),
+ paymentStatus: paymentStatusEnum('payment_state').notNull().default('pending'),
+ cancellationUserNotes: text('cancellation_user_notes'),
+ cancellationAdminNotes: text('cancellation_admin_notes'),
+ cancellationReviewed: boolean('cancellation_reviewed').notNull().default(false),
+ cancellationReviewedAt: timestamp('cancellation_reviewed_at'),
+ refundCouponId: integer('refund_coupon_id').references(() => coupons.id),
+});
+
+export const paymentInfoTable = mf.table('payment_info', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ status: varchar({ length: 50 }).notNull(),
+ gateway: varchar({ length: 50 }).notNull(),
+ orderId: varchar('order_id', { length: 500 }),
+ token: varchar({ length: 500 }),
+ merchantOrderId: varchar('merchant_order_id', { length: 255 }).notNull().unique(),
+ payload: jsonb('payload'),
+});
+
+export const payments = mf.table('payments', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ status: varchar({ length: 50 }).notNull(),
+ gateway: varchar({ length: 50 }).notNull(),
+ orderId: integer('order_id').notNull().references(() => orders.id),
+ token: varchar({ length: 500 }),
+ merchantOrderId: varchar('merchant_order_id', { length: 255 }).notNull().unique(),
+ payload: jsonb('payload'),
+});
+
+export const refunds = mf.table('refunds', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ orderId: integer('order_id').notNull().references(() => orders.id),
+ refundAmount: numeric('refund_amount', { precision: 10, scale: 2 }),
+ refundStatus: varchar('refund_status', { length: 50 }).default('none'),
+ merchantRefundId: varchar('merchant_refund_id', { length: 255 }),
+ refundProcessedAt: timestamp('refund_processed_at'),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+});
+
+export const keyValStore = mf.table('key_val_store', {
+ key: varchar('key', { length: 255 }).primaryKey(),
+ value: jsonb('value'),
+});
+
+export const notifications = mf.table('notifications', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ userId: integer('user_id').notNull().references(() => users.id),
+ title: varchar({ length: 255 }).notNull(),
+ body: varchar({ length: 512 }).notNull(),
+ type: varchar({ length: 50 }),
+ isRead: boolean('is_read').notNull().default(false),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+});
+
+export const productCategories = mf.table('product_categories', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ name: varchar({ length: 255 }).notNull(),
+ description: varchar({ length: 500 }),
+});
+
+export const cartItems = mf.table('cart_items', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ userId: integer('user_id').notNull().references(() => users.id),
+ productId: integer('product_id').notNull().references(() => productInfo.id),
+ quantity: numeric({ precision: 10, scale: 2 }).notNull(),
+ addedAt: timestamp('added_at').notNull().defaultNow(),
+}, (t) => ({
+ unq_user_product: unique('unique_user_product').on(t.userId, t.productId),
+}));
+
+export const complaints = mf.table('complaints', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ userId: integer('user_id').notNull().references(() => users.id),
+ orderId: integer('order_id').references(() => orders.id),
+ complaintBody: varchar('complaint_body', { length: 1000 }).notNull(),
+ images: jsonb('images'),
+ response: varchar('response', { length: 1000 }),
+ isResolved: boolean('is_resolved').notNull().default(false),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+});
+
+export const coupons = mf.table('coupons', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ couponCode: varchar('coupon_code', { length: 50 }).notNull().unique('unique_coupon_code'),
+ isUserBased: boolean('is_user_based').notNull().default(false),
+ discountPercent: numeric('discount_percent', { precision: 5, scale: 2 }),
+ flatDiscount: numeric('flat_discount', { precision: 10, scale: 2 }),
+ minOrder: numeric('min_order', { precision: 10, scale: 2 }),
+ productIds: jsonb('product_ids'),
+ createdBy: integer('created_by').references(() => staffUsers.id),
+ maxValue: numeric('max_value', { precision: 10, scale: 2 }),
+ isApplyForAll: boolean('is_apply_for_all').notNull().default(false),
+ validTill: timestamp('valid_till'),
+ maxLimitForUser: integer('max_limit_for_user'),
+ isInvalidated: boolean('is_invalidated').notNull().default(false),
+ exclusiveApply: boolean('exclusive_apply').notNull().default(false),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+});
+
+export const couponUsage = mf.table('coupon_usage', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ userId: integer('user_id').notNull().references(() => users.id),
+ couponId: integer('coupon_id').notNull().references(() => coupons.id),
+ orderId: integer('order_id').references(() => orders.id),
+ orderItemId: integer('order_item_id').references(() => orderItems.id),
+ usedAt: timestamp('used_at').notNull().defaultNow(),
+});
+
+export const couponApplicableUsers = mf.table('coupon_applicable_users', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ couponId: integer('coupon_id').notNull().references(() => coupons.id),
+ userId: integer('user_id').notNull().references(() => users.id),
+}, (t) => ({
+ unq_coupon_user: unique('unique_coupon_user').on(t.couponId, t.userId),
+}));
+
+export const couponApplicableProducts = mf.table('coupon_applicable_products', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ couponId: integer('coupon_id').notNull().references(() => coupons.id),
+ productId: integer('product_id').notNull().references(() => productInfo.id),
+}, (t) => ({
+ unq_coupon_product: unique('unique_coupon_product').on(t.couponId, t.productId),
+}));
+
+export const userIncidents = mf.table('user_incidents', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ userId: integer('user_id').notNull().references(() => users.id),
+ orderId: integer('order_id').references(() => orders.id),
+ dateAdded: timestamp('date_added').notNull().defaultNow(),
+ adminComment: text('admin_comment'),
+ addedBy: integer('added_by').references(() => staffUsers.id),
+ negativityScore: integer('negativity_score'),
+});
+
+export const reservedCoupons = mf.table('reserved_coupons', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ secretCode: varchar('secret_code', { length: 50 }).notNull().unique(),
+ couponCode: varchar('coupon_code', { length: 50 }).notNull(),
+ discountPercent: numeric('discount_percent', { precision: 5, scale: 2 }),
+ flatDiscount: numeric('flat_discount', { precision: 10, scale: 2 }),
+ minOrder: numeric('min_order', { precision: 10, scale: 2 }),
+ productIds: jsonb('product_ids'),
+ maxValue: numeric('max_value', { precision: 10, scale: 2 }),
+ validTill: timestamp('valid_till'),
+ maxLimitForUser: integer('max_limit_for_user'),
+ exclusiveApply: boolean('exclusive_apply').notNull().default(false),
+ isRedeemed: boolean('is_redeemed').notNull().default(false),
+ redeemedBy: integer('redeemed_by').references(() => users.id),
+ redeemedAt: timestamp('redeemed_at'),
+ createdBy: integer('created_by').notNull().references(() => staffUsers.id),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+}, (t) => ({
+ unq_secret_code: unique('unique_secret_code').on(t.secretCode),
+}));
+
+export const notifCreds = mf.table('notif_creds', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ token: varchar({ length: 500 }).notNull().unique(),
+ addedAt: timestamp('added_at').notNull().defaultNow(),
+ userId: integer('user_id').notNull().references(() => users.id),
+ lastVerified: timestamp('last_verified'),
+});
+
+export const unloggedUserTokens = mf.table('unlogged_user_tokens', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ token: varchar({ length: 500 }).notNull().unique(),
+ addedAt: timestamp('added_at').notNull().defaultNow(),
+ lastVerified: timestamp('last_verified'),
+});
+
+export const userNotifications = mf.table('user_notifications', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ title: varchar('title', { length: 255 }).notNull(),
+ imageUrl: varchar('image_url', { length: 500 }),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+ body: text('body').notNull(),
+ applicableUsers: jsonb('applicable_users'),
+});
+
+export const staffRoles = mf.table('staff_roles', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ roleName: staffRoleEnum('role_name').notNull(),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+}, (t) => ({
+ unq_role_name: unique('unique_role_name').on(t.roleName),
+}));
+
+export const staffPermissions = mf.table('staff_permissions', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ permissionName: staffPermissionEnum('permission_name').notNull(),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+}, (t) => ({
+ unq_permission_name: unique('unique_permission_name').on(t.permissionName),
+}));
+
+export const staffRolePermissions = mf.table('staff_role_permissions', {
+ id: integer().primaryKey().generatedAlwaysAsIdentity(),
+ staffRoleId: integer('staff_role_id').notNull().references(() => staffRoles.id),
+ staffPermissionId: integer('staff_permission_id').notNull().references(() => staffPermissions.id),
+ createdAt: timestamp('created_at').notNull().defaultNow(),
+}, (t) => ({
+ unq_role_permission: unique('unique_role_permission').on(t.staffRoleId, t.staffPermissionId),
+}));
+
+// Relations
+export const usersRelations = relations(users, ({ many, one }) => ({
+ addresses: many(addresses),
+ orders: many(orders),
+ notifications: many(notifications),
+ cartItems: many(cartItems),
+ userCreds: one(userCreds),
+ coupons: many(coupons),
+ couponUsages: many(couponUsage),
+ applicableCoupons: many(couponApplicableUsers),
+ userDetails: one(userDetails),
+ notifCreds: many(notifCreds),
+ userIncidents: many(userIncidents),
+}));
+
+export const userCredsRelations = relations(userCreds, ({ one }) => ({
+ user: one(users, { fields: [userCreds.userId], references: [users.id] }),
+}));
+
+export const staffUsersRelations = relations(staffUsers, ({ one, many }) => ({
+ role: one(staffRoles, { fields: [staffUsers.staffRoleId], references: [staffRoles.id] }),
+ coupons: many(coupons),
+ stores: many(storeInfo),
+}));
+
+export const addressesRelations = relations(addresses, ({ one, many }) => ({
+ user: one(users, { fields: [addresses.userId], references: [users.id] }),
+ orders: many(orders),
+ zone: one(addressZones, { fields: [addresses.zoneId], references: [addressZones.id] }),
+}));
+
+export const unitsRelations = relations(units, ({ many }) => ({
+ products: many(productInfo),
+}));
+
+export const productInfoRelations = relations(productInfo, ({ one, many }) => ({
+ unit: one(units, { fields: [productInfo.unitId], references: [units.id] }),
+ store: one(storeInfo, { fields: [productInfo.storeId], references: [storeInfo.id] }),
+ productSlots: many(productSlots),
+ specialDeals: many(specialDeals),
+ orderItems: many(orderItems),
+ cartItems: many(cartItems),
+ tags: many(productTags),
+ applicableCoupons: many(couponApplicableProducts),
+ reviews: many(productReviews),
+ groups: many(productGroupMembership),
+}));
+
+export const productTagInfoRelations = relations(productTagInfo, ({ many }) => ({
+ products: many(productTags),
+}));
+
+export const productTagsRelations = relations(productTags, ({ one }) => ({
+ product: one(productInfo, { fields: [productTags.productId], references: [productInfo.id] }),
+ tag: one(productTagInfo, { fields: [productTags.tagId], references: [productTagInfo.id] }),
+}));
+
+export const deliverySlotInfoRelations = relations(deliverySlotInfo, ({ many }) => ({
+ productSlots: many(productSlots),
+ orders: many(orders),
+ vendorSnippets: many(vendorSnippets),
+}));
+
+export const productSlotsRelations = relations(productSlots, ({ one }) => ({
+ product: one(productInfo, { fields: [productSlots.productId], references: [productInfo.id] }),
+ slot: one(deliverySlotInfo, { fields: [productSlots.slotId], references: [deliverySlotInfo.id] }),
+}));
+
+export const specialDealsRelations = relations(specialDeals, ({ one }) => ({
+ product: one(productInfo, { fields: [specialDeals.productId], references: [productInfo.id] }),
+}));
+
+export const ordersRelations = relations(orders, ({ one, many }) => ({
+ user: one(users, { fields: [orders.userId], references: [users.id] }),
+ address: one(addresses, { fields: [orders.addressId], references: [addresses.id] }),
+ slot: one(deliverySlotInfo, { fields: [orders.slotId], references: [deliverySlotInfo.id] }),
+ orderItems: many(orderItems),
+ payment: one(payments),
+ paymentInfo: one(paymentInfoTable, { fields: [orders.paymentInfoId], references: [paymentInfoTable.id] }),
+ orderStatus: many(orderStatus),
+ refunds: many(refunds),
+ couponUsages: many(couponUsage),
+ userIncidents: many(userIncidents),
+}));
+
+export const orderItemsRelations = relations(orderItems, ({ one }) => ({
+ order: one(orders, { fields: [orderItems.orderId], references: [orders.id] }),
+ product: one(productInfo, { fields: [orderItems.productId], references: [productInfo.id] }),
+}));
+
+export const orderStatusRelations = relations(orderStatus, ({ one }) => ({
+ order: one(orders, { fields: [orderStatus.orderId], references: [orders.id] }),
+ user: one(users, { fields: [orderStatus.userId], references: [users.id] }),
+ refundCoupon: one(coupons, { fields: [orderStatus.refundCouponId], references: [coupons.id] }),
+}));
+
+export const paymentInfoRelations = relations(paymentInfoTable, ({ one }) => ({
+ order: one(orders, { fields: [paymentInfoTable.id], references: [orders.paymentInfoId] }),
+}));
+
+export const paymentsRelations = relations(payments, ({ one }) => ({
+ order: one(orders, { fields: [payments.orderId], references: [orders.id] }),
+}));
+
+export const refundsRelations = relations(refunds, ({ one }) => ({
+ order: one(orders, { fields: [refunds.orderId], references: [orders.id] }),
+}));
+
+export const notificationsRelations = relations(notifications, ({ one }) => ({
+ user: one(users, { fields: [notifications.userId], references: [users.id] }),
+}));
+
+export const productCategoriesRelations = relations(productCategories, ({}) => ({}));
+
+export const cartItemsRelations = relations(cartItems, ({ one }) => ({
+ user: one(users, { fields: [cartItems.userId], references: [users.id] }),
+ product: one(productInfo, { fields: [cartItems.productId], references: [productInfo.id] }),
+}));
+
+export const complaintsRelations = relations(complaints, ({ one }) => ({
+ user: one(users, { fields: [complaints.userId], references: [users.id] }),
+ order: one(orders, { fields: [complaints.orderId], references: [orders.id] }),
+}));
+
+export const couponsRelations = relations(coupons, ({ one, many }) => ({
+ creator: one(staffUsers, { fields: [coupons.createdBy], references: [staffUsers.id] }),
+ usages: many(couponUsage),
+ applicableUsers: many(couponApplicableUsers),
+ applicableProducts: many(couponApplicableProducts),
+}));
+
+export const couponUsageRelations = relations(couponUsage, ({ one }) => ({
+ user: one(users, { fields: [couponUsage.userId], references: [users.id] }),
+ coupon: one(coupons, { fields: [couponUsage.couponId], references: [coupons.id] }),
+ order: one(orders, { fields: [couponUsage.orderId], references: [orders.id] }),
+ orderItem: one(orderItems, { fields: [couponUsage.orderItemId], references: [orderItems.id] }),
+}));
+
+export const userDetailsRelations = relations(userDetails, ({ one }) => ({
+ user: one(users, { fields: [userDetails.userId], references: [users.id] }),
+}));
+
+export const notifCredsRelations = relations(notifCreds, ({ one }) => ({
+ user: one(users, { fields: [notifCreds.userId], references: [users.id] }),
+}));
+
+export const userNotificationsRelations = relations(userNotifications, ({}) => ({
+ // No relations needed for now
+}));
+
+export const storeInfoRelations = relations(storeInfo, ({ one, many }) => ({
+ owner: one(staffUsers, { fields: [storeInfo.owner], references: [staffUsers.id] }),
+ products: many(productInfo),
+}));
+
+export const couponApplicableUsersRelations = relations(couponApplicableUsers, ({ one }) => ({
+ coupon: one(coupons, { fields: [couponApplicableUsers.couponId], references: [coupons.id] }),
+ user: one(users, { fields: [couponApplicableUsers.userId], references: [users.id] }),
+}));
+
+export const couponApplicableProductsRelations = relations(couponApplicableProducts, ({ one }) => ({
+ coupon: one(coupons, { fields: [couponApplicableProducts.couponId], references: [coupons.id] }),
+ product: one(productInfo, { fields: [couponApplicableProducts.productId], references: [productInfo.id] }),
+}));
+
+export const reservedCouponsRelations = relations(reservedCoupons, ({ one }) => ({
+ redeemedUser: one(users, { fields: [reservedCoupons.redeemedBy], references: [users.id] }),
+ creator: one(staffUsers, { fields: [reservedCoupons.createdBy], references: [staffUsers.id] }),
+}));
+
+export const productReviewsRelations = relations(productReviews, ({ one }) => ({
+ user: one(users, { fields: [productReviews.userId], references: [users.id] }),
+ product: one(productInfo, { fields: [productReviews.productId], references: [productInfo.id] }),
+}));
+
+export const addressZonesRelations = relations(addressZones, ({ many }) => ({
+ addresses: many(addresses),
+ areas: many(addressAreas),
+}));
+
+export const addressAreasRelations = relations(addressAreas, ({ one }) => ({
+ zone: one(addressZones, { fields: [addressAreas.zoneId], references: [addressZones.id] }),
+}));
+
+export const productGroupInfoRelations = relations(productGroupInfo, ({ many }) => ({
+ memberships: many(productGroupMembership),
+}));
+
+export const productGroupMembershipRelations = relations(productGroupMembership, ({ one }) => ({
+ product: one(productInfo, { fields: [productGroupMembership.productId], references: [productInfo.id] }),
+ group: one(productGroupInfo, { fields: [productGroupMembership.groupId], references: [productGroupInfo.id] }),
+}));
+
+export const homeBannersRelations = relations(homeBanners, ({}) => ({
+ // Relations for productIds array would be more complex, skipping for now
+}));
+
+export const staffRolesRelations = relations(staffRoles, ({ many }) => ({
+ staffUsers: many(staffUsers),
+ rolePermissions: many(staffRolePermissions),
+}));
+
+export const staffPermissionsRelations = relations(staffPermissions, ({ many }) => ({
+ rolePermissions: many(staffRolePermissions),
+}));
+
+export const staffRolePermissionsRelations = relations(staffRolePermissions, ({ one }) => ({
+ role: one(staffRoles, { fields: [staffRolePermissions.staffRoleId], references: [staffRoles.id] }),
+ permission: one(staffPermissions, { fields: [staffRolePermissions.staffPermissionId], references: [staffPermissions.id] }),
+}));
+
+export const userIncidentsRelations = relations(userIncidents, ({ one }) => ({
+ user: one(users, { fields: [userIncidents.userId], references: [users.id] }),
+ order: one(orders, { fields: [userIncidents.orderId], references: [orders.id] }),
+ addedBy: one(staffUsers, { fields: [userIncidents.addedBy], references: [staffUsers.id] }),
+}));
diff --git a/packages/db_helper_postgres/src/db/seed.ts b/packages/db_helper_postgres/src/db/seed.ts
new file mode 100644
index 0000000..f894534
--- /dev/null
+++ b/packages/db_helper_postgres/src/db/seed.ts
@@ -0,0 +1,138 @@
+import { db } from "@/src/db/db_index"
+import { units, productInfo, deliverySlotInfo, productSlots, keyValStore, staffRoles, staffPermissions, staffRolePermissions } from "@/src/db/schema"
+import { eq } from "drizzle-orm";
+import { minOrderValue, deliveryCharge } from '@/src/lib/env-exporter'
+import { CONST_KEYS } from '@/src/lib/const-keys'
+
+export async function seed() {
+ console.log("Seeding database...");
+
+ // Seed units individually
+ const unitsToSeed = [
+ { shortNotation: "Kg", fullName: "Kilogram" },
+ { shortNotation: "L", fullName: "Litre" },
+ { shortNotation: "Dz", fullName: "Dozen" },
+ { shortNotation: "Pc", fullName: "Unit Piece" },
+ ];
+
+ for (const unit of unitsToSeed) {
+ const existingUnit = await db.query.units.findFirst({
+ where: eq(units.shortNotation, unit.shortNotation),
+ });
+ if (!existingUnit) {
+ await db.insert(units).values(unit);
+ }
+ }
+
+ // Seed staff roles individually
+ const rolesToSeed = ['super_admin', 'admin', 'marketer', 'delivery_staff'] as const;
+
+ for (const roleName of rolesToSeed) {
+ const existingRole = await db.query.staffRoles.findFirst({
+ where: eq(staffRoles.roleName, roleName),
+ });
+ if (!existingRole) {
+ await db.insert(staffRoles).values({ roleName });
+ }
+ }
+
+ // Seed staff permissions individually
+ const permissionsToSeed = ['crud_product', 'make_coupon', 'crud_staff_users'] as const;
+
+ for (const permissionName of permissionsToSeed) {
+ const existingPermission = await db.query.staffPermissions.findFirst({
+ where: eq(staffPermissions.permissionName, permissionName),
+ });
+ if (!existingPermission) {
+ await db.insert(staffPermissions).values({ permissionName });
+ }
+ }
+
+ // Seed role-permission assignments
+ await db.transaction(async (tx) => {
+ // Get role IDs
+ const superAdminRole = await tx.query.staffRoles.findFirst({ where: eq(staffRoles.roleName, 'super_admin') });
+ const adminRole = await tx.query.staffRoles.findFirst({ where: eq(staffRoles.roleName, 'admin') });
+ const marketerRole = await tx.query.staffRoles.findFirst({ where: eq(staffRoles.roleName, 'marketer') });
+
+ // Get permission IDs
+ const crudProductPerm = await tx.query.staffPermissions.findFirst({ where: eq(staffPermissions.permissionName, 'crud_product') });
+ const makeCouponPerm = await tx.query.staffPermissions.findFirst({ where: eq(staffPermissions.permissionName, 'make_coupon') });
+ const crudStaffUsersPerm = await tx.query.staffPermissions.findFirst({ where: eq(staffPermissions.permissionName, 'crud_staff_users') });
+
+ // Assign all permissions to super_admin
+ [crudProductPerm, makeCouponPerm, crudStaffUsersPerm].forEach(async (perm) => {
+ if (superAdminRole && perm) {
+ const existingSuperAdminPerm = await tx.query.staffRolePermissions.findFirst({
+ where: eq(staffRolePermissions.staffRoleId, superAdminRole.id) && eq(staffRolePermissions.staffPermissionId, perm.id),
+ });
+ if (!existingSuperAdminPerm) {
+ await tx.insert(staffRolePermissions).values({
+ staffRoleId: superAdminRole.id,
+ staffPermissionId: perm.id,
+ });
+ }
+ }
+ });
+
+ // Assign all permissions to admin
+ [crudProductPerm, makeCouponPerm].forEach(async (perm) => {
+ if (adminRole && perm) {
+ const existingAdminPerm = await tx.query.staffRolePermissions.findFirst({
+ where: eq(staffRolePermissions.staffRoleId, adminRole.id) && eq(staffRolePermissions.staffPermissionId, perm.id),
+ });
+ if (!existingAdminPerm) {
+ await tx.insert(staffRolePermissions).values({
+ staffRoleId: adminRole.id,
+ staffPermissionId: perm.id,
+ });
+ }
+ }
+ });
+
+ // Assign make_coupon to marketer
+ if (marketerRole && makeCouponPerm) {
+ const existingMarketerCoupon = await tx.query.staffRolePermissions.findFirst({
+ where: eq(staffRolePermissions.staffRoleId, marketerRole.id) && eq(staffRolePermissions.staffPermissionId, makeCouponPerm.id),
+ });
+ if (!existingMarketerCoupon) {
+ await tx.insert(staffRolePermissions).values({
+ staffRoleId: marketerRole.id,
+ staffPermissionId: makeCouponPerm.id,
+ });
+ }
+ }
+ });
+
+ // Seed key-val store constants using CONST_KEYS
+ const constantsToSeed = [
+ { key: CONST_KEYS.readableOrderId, value: 0 },
+ { key: CONST_KEYS.minRegularOrderValue, value: minOrderValue },
+ { key: CONST_KEYS.freeDeliveryThreshold, value: minOrderValue },
+ { key: CONST_KEYS.deliveryCharge, value: deliveryCharge },
+ { key: CONST_KEYS.flashFreeDeliveryThreshold, value: 500 },
+ { key: CONST_KEYS.flashDeliveryCharge, value: 69 },
+ { key: CONST_KEYS.popularItems, value: [] },
+ { key: CONST_KEYS.allItemsOrder, value: [] },
+ { key: CONST_KEYS.versionNum, value: '1.1.0' },
+ { key: CONST_KEYS.playStoreUrl, value: 'https://play.google.com/store/apps/details?id=in.freshyo.app' },
+ { key: CONST_KEYS.appStoreUrl, value: 'https://apps.apple.com/in/app/freshyo/id6756889077' },
+ { key: CONST_KEYS.isFlashDeliveryEnabled, value: false },
+ { key: CONST_KEYS.supportMobile, value: '8688182552' },
+ { key: CONST_KEYS.supportEmail, value: 'qushammohd@gmail.com' },
+ ];
+
+ for (const constant of constantsToSeed) {
+ const existing = await db.query.keyValStore.findFirst({
+ where: eq(keyValStore.key, constant.key),
+ });
+ if (!existing) {
+ await db.insert(keyValStore).values({
+ key: constant.key,
+ value: constant.value,
+ });
+ }
+ }
+
+ console.log("Seeding completed.");
+}
diff --git a/packages/db_helper_postgres/src/db/types.ts b/packages/db_helper_postgres/src/db/types.ts
new file mode 100755
index 0000000..64d42de
--- /dev/null
+++ b/packages/db_helper_postgres/src/db/types.ts
@@ -0,0 +1,47 @@
+import type { InferSelectModel } from "drizzle-orm";
+import type {
+ users,
+ addresses,
+ units,
+ productInfo,
+ deliverySlotInfo,
+ productSlots,
+ specialDeals,
+ orders,
+ orderItems,
+ payments,
+ notifications,
+ productCategories,
+ cartItems,
+ coupons,
+} from "@/src/db/schema";
+
+export type User = InferSelectModel;
+export type Address = InferSelectModel;
+export type Unit = InferSelectModel;
+export type ProductInfo = InferSelectModel;
+export type DeliverySlotInfo = InferSelectModel;
+export type ProductSlot = InferSelectModel;
+export type SpecialDeal = InferSelectModel;
+export type Order = InferSelectModel;
+export type OrderItem = InferSelectModel;
+export type Payment = InferSelectModel;
+export type Notification = InferSelectModel;
+export type ProductCategory = InferSelectModel;
+export type CartItem = InferSelectModel;
+export type Coupon = InferSelectModel;
+
+// Combined types
+export type ProductWithUnit = ProductInfo & {
+ unit: Unit;
+};
+
+export type OrderWithItems = Order & {
+ items: (OrderItem & { product: ProductInfo })[];
+ address: Address;
+ slot: DeliverySlotInfo;
+};
+
+export type CartItemWithProduct = CartItem & {
+ product: ProductInfo;
+};
diff --git a/packages/db_helper_postgres/src/helper_methods/banner.ts b/packages/db_helper_postgres/src/helper_methods/banner.ts
new file mode 100644
index 0000000..23b6f56
--- /dev/null
+++ b/packages/db_helper_postgres/src/helper_methods/banner.ts
@@ -0,0 +1,112 @@
+import { db } from '../db/db_index';
+import { homeBanners } from '../db/schema';
+import { desc, eq } from 'drizzle-orm';
+
+export interface Banner {
+ id: number;
+ name: string;
+ imageUrl: string;
+ description: string | null;
+ productIds: number[] | null;
+ redirectUrl: string | null;
+ serialNum: number | null;
+ isActive: boolean;
+ createdAt: Date;
+ lastUpdated: Date;
+}
+
+export async function getBanners(): Promise {
+ const banners = await db.query.homeBanners.findMany({
+ orderBy: desc(homeBanners.createdAt),
+ });
+
+ return banners.map((banner) => ({
+ id: banner.id,
+ name: banner.name,
+ imageUrl: banner.imageUrl,
+ description: banner.description,
+ productIds: banner.productIds || [],
+ redirectUrl: banner.redirectUrl,
+ serialNum: banner.serialNum,
+ isActive: banner.isActive,
+ createdAt: banner.createdAt,
+ lastUpdated: banner.lastUpdated,
+ }));
+}
+
+export async function getBannerById(id: number): Promise {
+ const banner = await db.query.homeBanners.findFirst({
+ where: eq(homeBanners.id, id),
+ });
+
+ if (!banner) return null;
+
+ return {
+ id: banner.id,
+ name: banner.name,
+ imageUrl: banner.imageUrl,
+ description: banner.description,
+ productIds: banner.productIds || [],
+ redirectUrl: banner.redirectUrl,
+ serialNum: banner.serialNum,
+ isActive: banner.isActive,
+ createdAt: banner.createdAt,
+ lastUpdated: banner.lastUpdated,
+ };
+}
+
+export type CreateBannerInput = Omit;
+
+export async function createBanner(input: CreateBannerInput): Promise {
+ const [banner] = await db.insert(homeBanners).values({
+ name: input.name,
+ imageUrl: input.imageUrl,
+ description: input.description,
+ productIds: input.productIds,
+ redirectUrl: input.redirectUrl,
+ serialNum: input.serialNum,
+ isActive: input.isActive,
+ }).returning();
+
+ return {
+ id: banner.id,
+ name: banner.name,
+ imageUrl: banner.imageUrl,
+ description: banner.description,
+ productIds: banner.productIds || [],
+ redirectUrl: banner.redirectUrl,
+ serialNum: banner.serialNum,
+ isActive: banner.isActive,
+ createdAt: banner.createdAt,
+ lastUpdated: banner.lastUpdated,
+ };
+}
+
+export type UpdateBannerInput = Partial>;
+
+export async function updateBanner(id: number, input: UpdateBannerInput): Promise {
+ const [banner] = await db.update(homeBanners)
+ .set({
+ ...input,
+ lastUpdated: new Date(),
+ })
+ .where(eq(homeBanners.id, id))
+ .returning();
+
+ return {
+ id: banner.id,
+ name: banner.name,
+ imageUrl: banner.imageUrl,
+ description: banner.description,
+ productIds: banner.productIds || [],
+ redirectUrl: banner.redirectUrl,
+ serialNum: banner.serialNum,
+ isActive: banner.isActive,
+ createdAt: banner.createdAt,
+ lastUpdated: banner.lastUpdated,
+ };
+}
+
+export async function deleteBanner(id: number): Promise {
+ await db.delete(homeBanners).where(eq(homeBanners.id, id));
+}
diff --git a/packages/db_helper_postgres/tsconfig.json b/packages/db_helper_postgres/tsconfig.json
new file mode 100644
index 0000000..c49f51a
--- /dev/null
+++ b/packages/db_helper_postgres/tsconfig.json
@@ -0,0 +1,16 @@
+{
+ "compilerOptions": {
+ "target": "es2020",
+ "module": "commonjs",
+ "paths": {
+ "@/*": ["./*"]
+ },
+ "resolveJsonModule": true,
+ "outDir": "./dist",
+ "esModuleInterop": true,
+ "forceConsistentCasingInFileNames": true,
+ "strict": true,
+ "skipLibCheck": true
+ },
+ "include": ["src/**/*"]
+}
diff --git a/packages/shared/index.ts b/packages/shared/index.ts
index dae4213..a502ff8 100644
--- a/packages/shared/index.ts
+++ b/packages/shared/index.ts
@@ -7,3 +7,6 @@ export const CACHE_FILENAMES = {
} as const
export type CacheFilename = typeof CACHE_FILENAMES[keyof typeof CACHE_FILENAMES]
+
+// Re-export all types from the types folder
+export * from './types'
diff --git a/packages/shared/types/banner.types.ts b/packages/shared/types/banner.types.ts
new file mode 100644
index 0000000..a010158
--- /dev/null
+++ b/packages/shared/types/banner.types.ts
@@ -0,0 +1,17 @@
+/**
+ * Banner Types
+ * Central type definitions for banner-related data structures
+ */
+
+export interface Banner {
+ id: number;
+ name: string;
+ imageUrl: string;
+ description: string | null;
+ productIds: number[] | null;
+ redirectUrl: string | null;
+ serialNum: number | null;
+ isActive: boolean;
+ createdAt: Date;
+ lastUpdated: Date;
+}
diff --git a/packages/shared/types/index.ts b/packages/shared/types/index.ts
new file mode 100644
index 0000000..c934a34
--- /dev/null
+++ b/packages/shared/types/index.ts
@@ -0,0 +1,4 @@
+// Central types export file
+// Re-export all types from the types folder
+
+export type { Banner } from './banner.types';
diff --git a/packages/ui/index.ts b/packages/ui/index.ts
index 30549a9..45428fc 100755
--- a/packages/ui/index.ts
+++ b/packages/ui/index.ts
@@ -63,8 +63,8 @@ const isDevMode = Constants.executionEnvironment !== "standalone";
// const BASE_API_URL = API_URL;
// const BASE_API_URL = 'http://10.0.2.2:4000';
// const BASE_API_URL = 'http://192.168.100.101:4000';
-// const BASE_API_URL = 'http://192.168.1.5:4000';
-let BASE_API_URL = "https://mf.freshyo.in";
+const BASE_API_URL = 'http://192.168.1.5:4000';
+// let BASE_API_URL = "https://mf.freshyo.in";
// let BASE_API_URL = "https://freshyo.technocracy.ovh";
// let BASE_API_URL = 'http://192.168.100.107:4000';
// let BASE_API_URL = 'http://192.168.29.176:4000';